diff --git a/src/api/dev.ts b/src/api/dev.ts index adfd73a..78123e9 100644 --- a/src/api/dev.ts +++ b/src/api/dev.ts @@ -206,15 +206,19 @@ class Watcher extends EventEmitter { }); } } - ), - - fs.watch(`${src}/template.html`, () => { - this.dev_server.send({ - action: 'reload' - }); - }) + ) ); + if (this.live) { + this.filewatchers.push( + fs.watch(`${src}/template.html`, () => { + this.dev_server.send({ + action: 'reload' + }); + }) + ); + } + let deferred = new Deferred(); // TODO watch the configs themselves? @@ -252,7 +256,7 @@ class Watcher extends EventEmitter { this.dev_server.send({ status: 'completed' }); - } else { + } else if (this.live) { this.dev_server.send({ action: 'reload' });