summaryrefslogtreecommitdiff
path: root/model_fs.js
diff options
context:
space:
mode:
Diffstat (limited to 'model_fs.js')
-rw-r--r--model_fs.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/model_fs.js b/model_fs.js
index de2f56f..eaafa94 100644
--- a/model_fs.js
+++ b/model_fs.js
@@ -12,7 +12,11 @@ var files = [];
exports.start = function(config) {
configuration = config;
- watcher = require('watch-tree').watchTree(configuration.dir, {'sample-rate': 5});
+ if(typeof configuration.ignoreDotFiles !== 'undefined' && configuration.ignoreDotFiles == 'false') {
+ watcher = require('watch-tree').watchTree(configuration.rootDir, {});
+ } else {
+ watcher = require('watch-tree').watchTree(configuration.rootDir, {ignore: '.*'});
+ }
watcher.on('fileDeleted', exports.rebuildFiles);
watcher.on('fileCreated', exports.rebuildFiles);
watcher.on('fileModified', exports.rebuildFiles);