Created
April 7, 2015 19:24
-
-
Save JeffreyWay/911a33403f4624753ab7 to your computer and use it in GitHub Desktop.
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'); | |
var browserify = require('browserify'); | |
var babelify = require('babelify'); | |
var source = require('vinyl-source-stream'); | |
gulp.task('browserify', function() { | |
return browserify('./js/app.js') | |
.transform(babelify, { stage: 0 }) | |
.bundle() | |
.on('error', function(e){ | |
console.log(e.message); | |
this.emit('end'); | |
}) | |
.pipe(source('bundle.js')) | |
.pipe(gulp.dest('js')); | |
}); | |
gulp.task('watch', function() { | |
gulp.watch('**/*.js', ['browserify']); | |
}); |
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
{ | |
"devDependencies": { | |
"babelify": "^6.0.2", | |
"browserify": "^9.0.7", | |
"gulp": "^3.8.11", | |
"gulp-plumber": "^1.0.0", | |
"vinyl-source-stream": "^1.1.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment