Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxime GRIS committed Jan 12, 2018
2 parents b8cf343 + 8502712 commit b7cc405
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Your built files are in the /dist folder.

|Command|Description|
|--|--|
|`npm run start:web`| Execute the app in the brower |
|`npm run start:web`| Execute the app in the browser |
|`npm run electron:linux`| Builds your application and creates an app consumable on linux system |
|`npm run electron:windows`| On a Windows OS, builds your application and creates an app consumable in windows 32/64 bit systems |
|`npm run electron:mac`| On a MAC OS, builds your application and generates a `.app` file of your application that can be run on Mac |
Expand Down
7 changes: 6 additions & 1 deletion main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import * as path from 'path';
let win, serve;
const args = process.argv.slice(1);
serve = args.some(val => val === '--serve');
import * as url from 'url';

if (serve) {
require('electron-reload')(__dirname, {
Expand All @@ -24,7 +25,11 @@ function createWindow() {
});

// and load the index.html of the app.
win.loadURL('file://' + __dirname + '/index.html');
win.loadURL(url.format({
protocol: 'file:',
pathname: path.join(__dirname, '/index.html'),
slashes: true
}));

// Open the DevTools.
if (serve) {
Expand Down

0 comments on commit b7cc405

Please sign in to comment.