Created
January 21, 2015 14:36
-
-
Save viktor-evdokimov/2660587eeac2e362b57a to your computer and use it in GitHub Desktop.
gulp browserify reactify boilerplate gulp file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp') | |
, browserify = require('browserify') | |
, concat = require('gulp-concat') | |
, reactify = require('reactify') | |
, source = require("vinyl-source-stream") | |
gulp.task('browserify', function(){ | |
var b = browserify(); | |
b.transform(reactify); // use the reactify transform | |
b.add('./src/js/main.js'); | |
return b.bundle() | |
.pipe(source('main.js')) | |
.pipe(gulp.dest('./dist/js')); | |
}); | |
gulp.task('copy', function() { | |
gulp.src('src/index.html') | |
.pipe(gulp.dest('dist')) | |
}) | |
gulp.task('default', ['browserify','copy']) | |
gulp.task('watch', function() { | |
gulp.watch('src/**/*.*', ['default']) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment