Gulp watcher fix for win10 fixes #2642

Fix for browsersync and file watchers not working correctly on windows.
This commit is contained in:
Richard Hajdu 2020-06-28 18:38:29 +02:00 committed by GitHub
parent c4d0f86216
commit e1cd81e28c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -163,9 +163,9 @@ function initBrowserSync() {
// Watch
function watchPaths() {
watch(`${paths.sass}/*.scss`, styles)
watch(`${paths.templates}/**/*.html`).on("change", reload)
watch([`${paths.js}/*.js`, `!${paths.js}/*.min.js`], scripts).on("change", reload)
watch(`${paths.sass}/*.scss`{% if cookiecutter.windows == 'y' %}, { usePolling: true }{% endif %}, styles)
watch(`${paths.templates}/**/*.html`{% if cookiecutter.windows == 'y' %}, { usePolling: true }{% endif %}).on("change", reload)
watch([`${paths.js}/*.js`, `!${paths.js}/*.min.js`]{% if cookiecutter.windows == 'y' %}, { usePolling: true }{% endif %}, scripts).on("change", reload)
}
// Generate all assets