diff --git a/src/main/main.js b/src/main/main.js index 43a5b8d..2c37b8f 100644 --- a/src/main/main.js +++ b/src/main/main.js @@ -73,17 +73,17 @@ class Main { // Send to render process the url this.mainWindow.webContents.send('publishing'); - fs.writeFileSync(this.filePath, content); - - this.idyll - .build(this.workingDir) - .on('update', () => { - this.publish(); - }) - .on('error', err => { - console.log(err); - this.mainWindow.webContents.send('pub-error', err.message); - }); + fs.writeFile(this.filePath, content, () => { + this.idyll + .build(this.workingDir) + .on('update', () => { + this.publish(); + }) + .on('error', err => { + console.log(err); + this.mainWindow.webContents.send('pub-error', err.message); + }); + }); } }); // import dataset