Answer the question
In order to leave comments, you need to log in
How to tell gulp to watch all .html files in a given directory and update them with livereload?
Changed to '**/*.html' in 'watch' and 'html' , or both at once, but the expected result did not work. The 'html' task is executed, but the 'watch' task is not executed and the page is not reloaded after the changes made.
gulp.task('html',function(){
gulp.src('*.html')
.pipe(connect.reload());
})
gulp.task('watch', function() {
gulp.watch('index.html',['html'])
});
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