Gulp Watch Doesn't Watch
Following is my gulpfile.js. There are a couple of more tasks in it and all are working fine - but the last task, watch doesn't. I've tried every possible combination of paths and
Solution 1:
You should return
watch:
gulp.task('watch', function() {
return gulp.watch('./public/resources/jsx/project/*.js',['application'])
});
watch
is an async
method, so the only way Gulp can know that something is happening is if you return a promise
, which watch does.
Edit
As @JMM stated, watch
doesn't return a Promise. It returns an EventEmitter.
Post a Comment for "Gulp Watch Doesn't Watch"