Browse Source

fixes livereload when using root CLI param

t-fritsch 1 year ago
parent
commit
82d63e0296
1 changed files with 5 additions and 1 deletions
  1. 5 1
      gulpfile.js

+ 5 - 1
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'))