diff options
| author | Shulhan <ms@kilabit.info> | 2021-04-03 03:48:44 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2021-04-03 03:48:44 +0700 |
| commit | 298eb4dff25b4e97b66d49f005c896a88b0df5c6 (patch) | |
| tree | 4fe3e95b5025e6a4af8bf93e58aae9a908b3d951 | |
| parent | 96f436d42015048d7260a678d408a323f754356b (diff) | |
| download | ciigo-298eb4dff25b4e97b66d49f005c896a88b0df5c6.tar.xz | |
all: exclude common file and directories names for being watched
By default, any hidden files on Unix like system, which start with dot '.'
should not be watched for any changes. So does "node_modules" from npm
and "vendor" directory which may contains many unrelated files.
| -rw-r--r-- | watcher.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -56,6 +56,11 @@ func newWatcher(htmlg *htmlGenerator, dir string) (w *watcher, err error) { Includes: []string{ `.*\.adoc$`, }, + Excludes: []string{ + `^\..*`, + `node_modules/.*`, + `vendor/.*`, + }, }, Delay: time.Second, Callback: w.onChangeFileMarkup, |
