Answer the question
In order to leave comments, you need to log in
Why does watch fire in this case?
Guys, hello everyone.
Tell me why the watcher launches a task every time ... changes in a certain file seem to be excluded
gulp.task('watch', function() {
gulp.watch(
['./source/template/**/*.pug', './data/_project.json'],
gulp.series('pug')
);
gulp.watch('./source/styles/**/*.scss', gulp.series('sass'));
gulp.watch(
['!./data/_project.json', './data/**/*.json'],
gulp.series('json')
);
});
gulp.task('json', function() {
return gulp
.src(['./data/**/*.json', '!./data/*.json'])
.pipe(
jsonConcat('./_project.json', function(data) {
console.log('error');
return new Buffer(JSON.stringify(data));
})
)
.pipe(gulp.dest('./data'));
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question