Lets say I have gulp watch running and I add a file to a task. Is there any way to have the gulp watch process automatically restart since a task has changes?
Asked
Active
Viewed 836 times
1 Answers
2
gulp.watch isn't working for new or deleted files.
In order to accomplish that, you can use gulp-watch plugin: https://www.npmjs.org/package/gulp-watch
var gulp = require('gulp'),
watch = require('gulp-watch');
gulp.task('live', function () {
watch({glob: 'global/files/**/*.extension'}, function(files) {
// Do stuffs
});
});
This solution comes from this question:

Community
- 1
- 1

avcajaraville
- 9,041
- 2
- 28
- 37