react / react-0.13.3 / examples / basic-commonjs / node_modules / reactify / node_modules / react-tools / README.md
81145 viewsreact-tools
This package compliments the usage of React. It ships with tools that are often used in conjunction.
JSX
This package installs a jsx
executable that can be used to transform JSX into vanilla JS. This is often used as part of a build step. This transform is also exposed as an API.
Usage
Command Line
API
transform(inputString, options)
option | values | default |
---|---|---|
sourceMap | true : append inline source map at the end of the transformed source | false |
harmony | true : enable ES6 features | false |
sourceFilename | the output filename for the source map | "source.js" |
stripTypes | true : strips out type annotations | false |
transformWithDetails(inputString, options)
Just like transform
, but outputs an object: