Skip to content

Commit

Permalink
window spawn fix
Browse files Browse the repository at this point in the history
  • Loading branch information
igorls committed Jun 13, 2018
1 parent 1655694 commit c1dd49a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 18 deletions.
20 changes: 6 additions & 14 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ serve = args.some(val => val === '--serve');

function createWindow() {
win = new BrowserWindow({
x: 1280 / 2,
x: 100,
y: 100,
width: 1280,
height: 720,
Expand All @@ -19,19 +19,11 @@ function createWindow() {
icon: path.join(__dirname, 'src/assets/icons/ico/simpleos.ico')
});
win.setMenu(null);
if (serve) {
require('electron-reload')(__dirname, {
electron: require(__dirname + 'node_modules/electron')
});
win.loadURL('http://localhost:7868');
} else {
win.loadURL(url.format({
pathname: path.join(__dirname, 'ng-dist', 'index.html'),
protocol: 'file:',
slashes: true
}));
}
// win.webContents.openDevTools();
win.loadURL(url.format({
pathname: path.join(__dirname, 'ng-dist', 'index.html'),
protocol: 'file:',
slashes: true
}));
win.on('closed', () => {
win = null
});
Expand Down
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,20 @@
},
"repository": "https://github.com/eosrio/simpleos",
"license": "UNLICENSED",
"version": "0.3.3",
"version": "0.3.4",
"scripts": {
"ng": "ng",
"start": "ng serve --port 7878",
"build": "ng build",
"build:prod": "ng build --prod",
"pack": "electron-builder --dir",
"dist": "electron-builder",
"publish": "electron-builder build --win -p always",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"build-watch": "ng build --prod --watch",
"postinstall": "node patch.js && electron-builder install-app-deps",
"package": "electron-forge package",
"make": "electron-forge make"
"postinstall": "node patch.js && electron-builder install-app-deps"
},
"private": true,
"main": "index.js",
Expand Down

0 comments on commit c1dd49a

Please sign in to comment.