Don't webpack electron main, separate electron

* Don't webpack electron-main.js: no need to webpack in electron
 * Keep the electron file separate from the webapp, in their own
   'electron' directory
This commit is contained in:
David Baker 2016-10-19 17:18:35 +01:00
parent 976c20a2f7
commit 2026142595
4 changed files with 9 additions and 44 deletions

View file

@ -0,0 +1,18 @@
// @flow
const {app, BrowserWindow} = require('electron');
let window = null;
app.on('ready', () => {
window = new BrowserWindow({
icon: `${__dirname}/../../vector/img/logo.png`,
});
window.loadURL(`file://${__dirname}/../../vector/index.html`);
window.on('closed', () => {
window = null;
})
});
app.on('window-all-closed', () => {
app.quit();
});