gulp-react

Precompile Facebook React JSX templates into JavaScript

npm install gulp-react
60 downloads in the last day
295 downloads in the last week
840 downloads in the last month

gulp-react Build Status

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

npm loves you