Improve npm scripts consistency

Closes #255
This commit is contained in:
Farkas József
2017-02-13 23:10:22 +01:00
parent 846fd8941e
commit 61c20cd678
3 changed files with 11 additions and 7 deletions

View File

@@ -21,7 +21,9 @@ function createWindow() {
const indexPath = path.resolve(__dirname, './index.html');
// and load the index.html of the app.
win.loadURL(`file://${indexPath}`);
const url = process.argv[2] && process.argv[2].startsWith('--url=') ? process.argv[2].substring(6) : `file://${indexPath}`;
win.loadURL(url);
win.on('page-title-updated', (event) => {
event.preventDefault();