Fonts&icons offline in electron app, Fixes: #94

This commit is contained in:
ziajka
2018-04-10 12:45:40 +02:00
parent 99fceed253
commit fe4cd9082b
5 changed files with 19 additions and 14 deletions

11
main.js
View File

@ -18,8 +18,10 @@ let isDev = false;
const argv = yargs
.describe('m', 'Maximizes window on startup.')
.boolean('m')
.describe('e', 'Environment, `dev` for developer mode and when not specified then production mode. ')
.describe('e', 'Environment, `dev` for developer mode and when not specified then production mode.')
.choices('e', ['dev', null])
.describe('d', 'Enable developer tools.')
.boolean('d')
.argv;
if (argv.e == 'dev') {
@ -75,7 +77,6 @@ function createWindow () {
if(isDev) {
mainWindow.loadURL('http://localhost:4200/');
mainWindow.webContents.openDevTools();
}
else {
mainWindow.loadURL(url.format({
@ -85,8 +86,10 @@ function createWindow () {
}));
}
// Open the DevTools.
// mainWindow.webContents.openDevTools();
if(argv.d) {
// Open the DevTools.
mainWindow.webContents.openDevTools();
}
if(argv.m) {
mainWindow.maximize();