A gulp plugin that listens for file changes and emits changed files into the stream. Not to be confused with the built-in gulp.watch().
Installation
npm install --save-dev gulp-watch
Usage
gulp.task('watch-css', function () {
return gulp.src('css/**/*.css')
.pipe(watch('css/**/*.css'))
.pipe(gulp.dest('build'));
});
Recipes
- Rebuild only files that change
- Prevent pipe breaking on errors
- Starting tasks on events
- Filtering custom events
- Incremental build
Links