1.2.1 • Published 10 years ago
react-up v1.2.1
react-up
Whip up a react component for quick standalone display.
Install and run
npm install -g react-up
then run:
reactup path/to/component.jsOptions
--port: sets the http port (default: 8000)--css: path to a css file which will be used on the page. The file is also hot-loaded if any changes are made to it.
Eg.
reactup --port=5432 --css=theme.css path/to/component.jsLive reloading
Any changes made to the source component (or other modules require'd by the component) are live-reloaded in the page.

Setting props
You can pipe in props from stdin like this:
cat props.json | reactup path/to/component.jsAnd if you have something that produces a stream of ndjson you will get realtime updates whenever the props change. Eg:
npm i -g watch-json
watch-json props.json | reactup path/to/component.jsjsx and es6
Before sending to the browser we transform the component file with browserify and babelify so all of your jsx and es6 should work without a hitch (but please let me know if it doesn't!).
License
MIT