Skip to content

Commit 8284383

Browse files
committed
add polling to gulp watch, include volume mount option
1 parent b50eab3 commit 8284383

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,8 @@ A browser should launch viewing [https://localhost:3000](https://localhost:3000)
9191

9292
You should then be able to open a browser and visit [https://localhost:3000](https://localhost:3000)
9393

94-
In order to automatically update the site when editing an article, it is possible to mount a volume:
94+
(if you want to mount a volume to automatically refresh the page as you type add option `-v $PWD/app:/app/app` to your `docker run` command above)
9595

96-
1. `docker build --tag devjava .`
97-
1. `docker run --publish 3000:3000 --rm -v $PWD/app:/app/app devjava`
9896

9997
## Working with Content
10098

gulpfile.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -415,10 +415,10 @@ function serve(done) {
415415
}
416416
});
417417

418-
watch("app/**/*.md", {}, series(build));
419-
watch("app/**/*.html", {}, series(build));
420-
watch("app/scss/*.scss", {}, series(build));
421-
watch("site/**/", {}, browserSync.reload());
418+
watch("app/**/*.md", {interval: 1000, usePolling: true}, series(build));
419+
watch("app/**/*.html", {interval: 1000, usePolling: true}, series(build));
420+
watch("app/scss/*.scss", {interval: 1000, usePolling: true}, series(build));
421+
watch("site/**/", {interval: 1000, usePolling: true}, browserSync.reload());
422422
done();
423423
}
424424

0 commit comments

Comments
 (0)