1
0
mirror of https://github.com/hakimel/reveal.js.git synced 2025-04-21 04:52:14 +02:00

speed up livereload

connect.reload needs a stream of files to fire, but this stream is irrelevant here and slows refresh time a lot (from ~2ms to 2000ms here)
This commit is contained in:
Thomas Fritsch 2023-08-06 22:52:03 +02:00
parent 92ee97fbfe
commit 74a5dac34f

View File

@ -286,7 +286,7 @@ gulp.task('package', gulp.series(() =>
))
gulp.task('reload', () => gulp.src(['**/*.html', '**/*.md'])
gulp.task('reload', () => gulp.src(['index.html'])
.pipe(connect.reload()));
gulp.task('serve', () => {
@ -300,7 +300,7 @@ gulp.task('serve', () => {
const slidesRoot = root.endsWith('/') ? root : root + '/'
gulp.watch([
slidesRoot + '**/*.html',
slidesRoot + '**/*.html',
slidesRoot + '**/*.md',
`!${slidesRoot}**/node_modules/**`, // ignore node_modules
], gulp.series('reload'))