diff --git a/electron/main.js b/electron/index.js similarity index 92% rename from electron/main.js rename to electron/index.js index a349d367..d024d154 100644 --- a/electron/main.js +++ b/electron/index.js @@ -17,10 +17,7 @@ function createWindow() { const indexPath = path.resolve(__dirname, '../dist/index.html'); // and load the index.html of the app. - win.loadURL(`file://${indexPath}`) - - // Open the DevTools. - win.webContents.openDevTools() + win.loadURL(`file://${indexPath}`); // Emitted when the window is closed. win.on('closed', () => { @@ -28,13 +25,13 @@ function createWindow() { // in an array if your app supports multi windows, this is the time // when you should delete the corresponding element. win = null; - }) + }); } // This method will be called when Electron has finished // initialization and is ready to create browser windows. // Some APIs can only be used after this event occurs. -app.on('ready', createWindow) +app.on('ready', createWindow); // Quit when all windows are closed. app.on('window-all-closed', () => { @@ -43,7 +40,7 @@ app.on('window-all-closed', () => { if (process.platform !== 'darwin') { app.quit(); } -}) +}); app.on('activate', () => { // On macOS it's common to re-create a window in the app when the @@ -51,7 +48,7 @@ app.on('activate', () => { if (win === null) { createWindow() } -}) +}); // In this file you can include the rest of your app's specific main process // code. You can also put them in separate files and require them here \ No newline at end of file diff --git a/package.json b/package.json index f812fb33..4e076518 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,6 @@ "name": "uhk-agent", "version": "0.0.1", "description": "Agent is the configuration application of the Ultimate Hacking Keyboard.", - "main": "electron/main.js", "repository": { "type": "git", "url": "git@github.com:UltimateHackingKeyboard/agent.git" @@ -62,6 +61,6 @@ "build": "gulp", "build:test": "webpack --config \"test-serializer/webpack.config.js\"", "dev": "webpack-dev-server --config \"src/webpack.config.js\" --content-base \"./dist\"", - "electron": "electron ." + "electron": "electron electron/index.js" } }