-
The sample code in README contain the following Gulp task, which doesn’t signal async completion. function watch() {
gulp.watch(paths.scripts.src, scripts);
gulp.watch(paths.styles.src, styles);
} When I run a very similar task, the console says:
Should the example code be updated or did I miss something? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Why is your watch task ending? Watch tasks are meant to run forever until ctrl+c is used to end it which exits the program outside of that logging. |
Beta Was this translation helpful? Give feedback.
-
my gulp watch did not completing the task too gulp.task('x', function (done) {
console.log('x');
done();
});
gulp.task('watch', function () {
gulp.watch('./posts/**/*.md', { delay: 1000 }, gulp.series(['x']));
setTimeout(() => {
fs.appendFileSync(__dirname + '/posts\\hexo-theme-unit-test\\post-watcher.md', EOL);
}, 1000);
}); i've been finding from google, but the answer is same. and i try to test, but not working. iam using |
Beta Was this translation helpful? Give feedback.
Why is your watch task ending? Watch tasks are meant to run forever until ctrl+c is used to end it which exits the program outside of that logging.