fix: allows user to not watch

Fixes #516
This commit is contained in:
Remy Sharp
2015-09-21 10:49:41 +01:00
parent 526811d9b0
commit a3b6c3ec26
2 changed files with 5 additions and 3 deletions

View File

@@ -137,7 +137,7 @@ function normaliseRules(options, ready) {
rules.ignore.add(options.ignore);
// normalise the watch and ignore arrays
options.watch = rules.rules.watch;
options.watch = options.watch === false ? false : rules.rules.watch;
options.ignore = rules.rules.ignore;
ready(options);

View File

@@ -237,8 +237,10 @@ function run(options) {
});
}
debug('about to watch');
watch();
debug('start watch on: %s', config.options.watch);
if (config.options.watch !== false) {
watch();
}
}
function kill(child, signal, callback) {