Precompile Facebook React JSX templates into JavaScript
Issues with the output should be reported on the React issue tracker.
Install
$ npm install --save-dev gulp-react
Usage
var gulp = require('gulp');
var react = require('gulp-react');
gulp.task('default', function () {
return gulp.src('template.jsx')
.pipe(react())
.pipe(gulp.dest('dist'));
});
The JSX directive /** @jsx React.DOM */
is automagically prepended to .jsx
files if missing.
API
react(options)
options.harmony
Type: boolean
Default: false
Enable harmony features for JSX.
License
MIT © Sindre Sorhus