Closed alxbenz closed 6 years ago
Possible solution: maybe remove the watch task for livereload and html hint and explicitly trigger each task after each of the other tasks.
Would it be possible to only let .scss files through the sass task if a file has been changed since last run ? So that the reload is faster Maybe thanks to gulp-newer ?
Example :
.gulp.src(..)
.pipe(newer(DEST_FOLDER))
// here continue with all changed .scss files
.pipe(..)
@alxbenz I don't understand the connection between htmlhint and livereload. I thought htmlhint is a read-only task. But anyway it is a good idea to add htmlhint to the runSequence of the static:hb watch task!
I fear that moving the livereload watch task from its currently global approach (watch all in one task) to a local on like "everybody is responsible for its own reloading" leads to much more complicated code.
@luiswill We already use gulp-cached, that as far as I know, does the same as gulp-newer. See https://github.com/frontend-framework/build-framework/blob/master/tasks/htmlhint.js#L12 for an example in htmlhint task
@alxbenz didn't you fix this already in 5.2.x? Or are there still issues? Please close if already fixed...
Think this is fixed but was not closed
Yes, this has been fixed already.
While running certain tasks (e.g. sass, hb:static) the livereload and htmlhint tasks trigger multiple times causing the site to reload several times.