tschaub / gulp-newer

Pass through newer source files only
https://npmjs.org/package/gulp-newer
226 stars 24 forks source link

can't use with browserify #42

Closed oyb81076 closed 8 years ago

oyb81076 commented 8 years ago

` var newer = require("gulp-newer") ; var gulp = require("gulp") var source = require("vinyl-source-stream"); var buffer = require("vinyl-buffer"); gulp.task("lib", function(){ return browserify("lib.js").bundle() .pipe(source("lib-bundle.js")) .pipe(buffer()) .pipe(newer("./lib-bundle.js")) .pipe(gulp.dest(".")) }); // through events.js:141 // throw er; // Unhandled 'error' event

gulp.task("lib2", function(){ return browserify("lib.js").bundle() .pipe(source("lib-bundle.js")) .pipe(buffer()) .pipe(gulp.dest(".")) });//works well

`

tschaub commented 8 years ago

Please see https://github.com/gulpjs/gulp/blob/master/docs/recipes/fast-browserify-builds-with-watchify.md for details on getting fast incremental builds with Browserify (using Watchify is the way to go).