Yes, you can do what you want.
gulp.task('watch', function() {
gulp.watch(['directoryA/**/*.js', 'directoryB/js/**/*.js'], ['task']);
});
You can also add more to the array if you want to see other types of files. IE:'directoryA/**/*.html'
, , , :
gulp.task('watch', function() {
gulp.watch(['directoryA/**/*.js'], ['taskA']);
gulp.watch(['directoryB/**/*.js'], ['taskB']);
});
gulp Browerify Babelify.
gulp.task('taskA', function() {
return browserify('path/to/file.js')
.transform('babelify')
.bundle()
.pipe(source('file.js'))
.pipe(gulp.dest('destination/directory/'));
});
, , . , .