1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-30 18:49:43 +02:00

experimental electron-based desktop app support

This commit is contained in:
Harvey Kandola 2016-12-02 18:25:02 -08:00
parent 3b3785ba24
commit 43b1a39a5a
29 changed files with 273 additions and 62 deletions

33
app/tests/electron.js Normal file
View file

@ -0,0 +1,33 @@
/* 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 */