From 82d63e0296171c56d1548c51f6431b9b72aa1ad3 Mon Sep 17 00:00:00 2001 From: t-fritsch Date: Thu, 3 Aug 2023 22:23:58 +0200 Subject: [PATCH 1/2] fixes livereload when using root CLI param --- gulpfile.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index 6818e8b2..c350a544 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -298,7 +298,11 @@ gulp.task('serve', () => { livereload: true }) - gulp.watch(['**/*.html', '**/*.md'], gulp.series('reload')) + const slidesRoot = root.endsWith('/') ? root : root + '/' + gulp.watch([ + slidesRoot + '**/*.html', + slidesRoot + '**/*.md', + ], gulp.series('reload')) gulp.watch(['js/**'], gulp.series('js', 'reload', 'eslint')) From 2dd27b37c60dda88348f93d522ccbcb383e00b5c Mon Sep 17 00:00:00 2001 From: t-fritsch Date: Thu, 3 Aug 2023 22:31:07 +0200 Subject: [PATCH 2/2] ignore node_modules for livereload may allow perf boost --- gulpfile.js | 1 + 1 file changed, 1 insertion(+) diff --git a/gulpfile.js b/gulpfile.js index c350a544..ca22211f 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -302,6 +302,7 @@ gulp.task('serve', () => { gulp.watch([ slidesRoot + '**/*.html', slidesRoot + '**/*.md', + `!${slidesRoot}**/node_modules/**`, // ignore node_modules ], gulp.series('reload')) gulp.watch(['js/**'], gulp.series('js', 'reload', 'eslint'))