Created
February 2, 2015 15:11
-
-
Save simonmcmanus/386570ebf32c8ec25beb to your computer and use it in GitHub Desktop.
gulp-watchify
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 bundler = watchify(browserify('./src/main.js', watchify.args)); | |
function bundle() { | |
return bundler.bundle() | |
// log errors if they happen | |
.on('error', notify.onError(notifyError)) | |
.pipe(source('src/main.js')) | |
.pipe(buffer()) | |
.pipe(rename('kormorant-dev.min.js')) | |
.pipe(sourcemaps.init({loadMaps: true})) // loads map from browserify file | |
.pipe(sourcemaps.write('./')) | |
.pipe(gulp.dest('./dist')); | |
} | |
// bundler.transform('brfs'); | |
// bundler.on('update', bundle); | |
// use watchify to so we only rebuild the front end bundle when it needs to be rebuild. | |
//gulp.task('watch', bundle); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment