woah
Transpiles your React component and serves it on localhost
Last updated 2 years ago by lastw .
MIT · Original npm · Tarball · package.json
$ cnpm install woah 
SYNC missed versions from official npm registry.

Woah, dude

You can serve your React component with one command: woah.

$ touch index.js
$ echo "import React from 'react'; export default <div>Hello world</div>" > index.js
$ woah

Useful, when you are too lazy to setup another build pipeline, but do not need tons of boilerplate code from another starter-kit or create-app.

Installation

yarn global add woah
# or
npm i -g woah

Usage

woah [<filename>] [--port <port>]

By default it serves index.js from current directory.

Your file

To render React component, export it by default:

import React from 'react'; // it's alias to package's react 16
export default class MyFancyComponent extends React.Component {
  render() {
    <div>Woah, dude!</div>;
  }
}
import React from 'react'; // it's alias to package's react 16
export default function() {
  return <div>Woah, dude!</div>;
}

But you can also render React without exporting anything:

import React from 'react'; // 'react' is provided
import ReactDOM from 'react-dom'; // but you should install 'react-dom' by yourself

ReactDOM.render(<div>Woah, dude!</div>, document.querySelector('#root'));

See examples

Configuration

No configuration. You do not need it.

Roadmap

  1. Rebuild on changes
  2. ???
  3. PROFIT

See issues list.

Current Tags

  • 0.0.1-alpha.1                                ...           latest (2 years ago)

3 Versions

  • 0.0.1-alpha.1                                ...           2 years ago
  • 0.0.1-alpha                                ...           2 years ago
  • 0.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 4
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |