Answer the question
In order to leave comments, you need to log in
Why doesn't {since: gulp.lastRun('…')} skip changed files?
Hello!
I am using gulp 4 .
I just can't figure out why {since: gulp.lastRun('...')} doesn't pass changed files into the stream.
I add, rename files, gulp.watch works, but there are 0 files in the stream .
Without since everything works correctly.
Tell me, what could be the matter?
gulp.task('assets', function() {
return gulp.src('app/assets/**', {since: gulp.lastRun('assets')})
.pipe(gulp.dest('public'));
});
gulp.task('watch', function() {
gulp.watch('app/assets/**/*.*', gulp.series('assets'));
});
Answer the question
In order to leave comments, you need to log in
Since looks at the time of the last. changes, if you just renamed the file, then it will not be taken into account, in the case of statics, you need to change the change time with handles, you can see an example in my BemGo assembly .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question