Prevent watch initialization before config
This commit is contained in:
parent
82269a64b9
commit
c1c9847427
1 changed files with 5 additions and 10 deletions
|
@ -11,13 +11,12 @@ function fileFilter(file) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const watch = new CheapWatch({
|
|
||||||
dir: config.get("scriptsFolder"),
|
|
||||||
filter: fileFilter,
|
|
||||||
watch: !config.get("dry")
|
|
||||||
});
|
|
||||||
|
|
||||||
export async function setupWatch(signaller) {
|
export async function setupWatch(signaller) {
|
||||||
|
const watch = new CheapWatch({
|
||||||
|
dir: config.get("scriptsFolder"),
|
||||||
|
filter: fileFilter,
|
||||||
|
watch: !config.get("dry")
|
||||||
|
});
|
||||||
|
|
||||||
if (!config.get("quiet")) console.log("Watching folder", resolve(config.get("scriptsFolder")))
|
if (!config.get("quiet")) console.log("Watching folder", resolve(config.get("scriptsFolder")))
|
||||||
|
|
||||||
|
@ -33,8 +32,4 @@ export async function setupWatch(signaller) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return watch;
|
return watch;
|
||||||
}
|
|
||||||
|
|
||||||
export function watchedFiles() {
|
|
||||||
return watch.paths;
|
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue