aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2021-04-03 03:48:44 +0700
committerShulhan <ms@kilabit.info>2021-04-03 03:48:44 +0700
commit298eb4dff25b4e97b66d49f005c896a88b0df5c6 (patch)
tree4fe3e95b5025e6a4af8bf93e58aae9a908b3d951
parent96f436d42015048d7260a678d408a323f754356b (diff)
downloadciigo-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.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/watcher.go b/watcher.go
index ed70dc3..6a8b98d 100644
--- a/watcher.go
+++ b/watcher.go
@@ -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,