How to run a task ONLY on modified file with Gulp watch
问题 I have the current gulp task which I use in a gulpfile. Path are from a config.json and everything works perfectly: //Some more code and vars... gulp.task('watch', function() { gulp.watch([config.path.devfolder+"/**/*.png", config.path.devfolder+"/**/*.jpg", config.path.devfolder+"/**/*.gif", config.path.devfolder+"/**/*.jpeg"], ['imagemin-cfg']); }) //Some more code ... gulp.task('imagemin-cfg', function () { return gulp.src([config.path.devfolder+"/**/*.png", config.path.devfolder+"/**/*