Skip to content

Instantly share code, notes, and snippets.

@funnythingz
Created January 17, 2015 08:04
Show Gist options
  • Save funnythingz/e9f266e9229aa7c1a95a to your computer and use it in GitHub Desktop.
Save funnythingz/e9f266e9229aa7c1a95a to your computer and use it in GitHub Desktop.
React with jsx
var gulp = require('gulp');
var react = require('gulp-react');
gulp.task('jsx', function() {
return gulp.src('src/jsx/**/*.jsx')
.pipe(react())
.pipe(gulp.dest('dist'));
});
gulp.task('watch', function() {
return gulp.watch('src/jsx/**/*.jsx', function(event) {
gulp.run('jsx');
});
});
gulp.task('default', function() {
gulp.run('watch');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment