mirror of
https://github.com/documize/community.git
synced 2025-07-18 20:59:43 +02:00
33 lines
749 B
JavaScript
33 lines
749 B
JavaScript
/* jshint undef: false */
|
|
|
|
const BrowserWindow = require('electron').BrowserWindow;
|
|
const app = require('electron').app;
|
|
|
|
let mainWindow = null;
|
|
|
|
app.on('window-all-closed', function onWindowAllClosed() {
|
|
if (process.platform !== 'darwin') {
|
|
app.quit();
|
|
}
|
|
});
|
|
|
|
app.on('ready', function onReady() {
|
|
mainWindow = new BrowserWindow({
|
|
width: 800,
|
|
height: 600
|
|
});
|
|
|
|
delete mainWindow.module;
|
|
|
|
if (process.env.EMBER_ENV === 'test') {
|
|
mainWindow.loadURL('file://' + __dirname + '/index.html');
|
|
} else {
|
|
mainWindow.loadURL('file://' + __dirname + '/dist/index.html');
|
|
}
|
|
|
|
mainWindow.on('closed', function onClosed() {
|
|
mainWindow = null;
|
|
});
|
|
});
|
|
|
|
/* jshint undef: true */
|