custom module: prevent reloading the module while the file is being written to
This commit is contained in:
parent
10937b5c10
commit
7316e85efb
2 changed files with 4 additions and 1 deletions
|
|
@ -65,7 +65,7 @@ class CustomModule {
|
|||
|
||||
this.load()
|
||||
|
||||
this.watcher = chokidar.watch(this.filename).on('change', ()=>{
|
||||
this.watcher = chokidar.watch(this.filename, {awaitWriteFinish: {stabilityThreshold: 200}}).on('change', ()=>{
|
||||
if (this.submodule) {
|
||||
console.log('(INFO) Submodule changed: ' + this.filename)
|
||||
this.parent.reload()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue