Answer the question
In order to leave comments, you need to log in
How to set tracking for html (Gulp)?
I started using galp recently and faced the problem of tracking html changes,
please tell me what is wrong here and how to fix it
gulp.task('html', function(){
return gulp.src('./build/**/*.html')
.pipe(gulp.dest('./build/**/*.html'))
});
Answer the question
In order to leave comments, you need to log in
gulp API, watch function: gulp.watch()
If on the fingers:
watch(globs, [options], [task])
globs - string or array - set where and what to track: file path
[options] - object with options, everything is in the dock. Optional argument.
[task] - a task to be run or a set of tasks via gulp.series, gulp.parallel. Or a function.
gulp.watch('entry/html/**/*.html', html);
Something like that.
For reference: info appeared in the dock that creating tasks via gulp.task(...) is no longer good and needs to be connected via exports
like:
const task1 = () => {};
exports.task1 = task1;
Now I am rewriting my basic assembly, so far I like it - it looks more concise.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question