Skip to content

Instantly share code, notes, and snippets.

@sergiors
Created January 13, 2015 23:49
Show Gist options
  • Save sergiors/c17084c444a8cf3853e0 to your computer and use it in GitHub Desktop.
Save sergiors/c17084c444a8cf3853e0 to your computer and use it in GitHub Desktop.
React Task
var gulp = require('gulp')
, source = require('vinyl-source-stream')
, browserify = require('browserify')
, reactify = require('reactify')
gulp.task('bundle', function() {
browserify({
entries: ['./public/scripts/dd/bootstrap.js'],
transform: ['reactify']
})
.bundle()
.pipe(source('dd.js'))
.pipe(gulp.dest('./public/scripts/dist'));
});
gulp.task('watch', function() {
gulp.watch('./public/scripts/dd/**/*', ['bundle'])
});
gulp.task('default', ['watch']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment