$ cnpm install jsx-recast
Compiles JavaScript written using JSX to use JavaScript-compatible syntax. For example, this:
<X prop={false}><Y /></X>
compiles to this:
X({prop: false}, Y(null, null));
$ npm install jsx-recast
$ node
> var jsx = require('jsx-recast')
> jsx.compile(jsxCode)
{ "code": ..., "map": ... }
> jsx.transform(jsxAst)
jsAst
Browserify support is built in.
$ npm install jsx-recast # install local dependency
$ browserify -t jsx-recast $file
First, install the development dependencies:
$ npm install
Then, try running the tests:
$ npm test
Copyright 2013 - present © cnpmjs.org | Home |