A single task in gulp.watch() using gulp.task() incorrectly logs as <anonymous>
Created by: jaydenseric
As discussed earlier.
Using the latest version of Gulp 4:
var gulp = require('gulp');
gulp.task('css', function () {
return gulp.src('test.css');
});
gulp.task('watch', function () {
gulp.watch('test.css', gulp.task('css'))
})
Results in:
[09:45:21] Starting 'watch'...
[09:45:24] Starting '<anonymous>'...
[09:45:24] Finished '<anonymous>' after 15 ms
Whereas replacing the watch task with:
gulp.task('watch', function () {
gulp.watch('test.css', gulp.registry().get('css'))
})
Results in:
[09:52:17] Starting 'watch'...
[09:52:20] Starting 'css'...
[09:52:20] Finished 'css' after 16 ms