Browse Source
Merge pull request #500 from mrfelton/fix/devtools-error-messages
Fix devtools startup error messages
renovate/lint-staged-8.x
Ben Woosley
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
6 additions and
8 deletions
-
app/main.dev.js
-
app/menu.js
|
|
@ -287,6 +287,12 @@ app.on('ready', async () => { |
|
|
|
mainWindow.loadURL(`file://${__dirname}/dist/index.html`) |
|
|
|
} |
|
|
|
|
|
|
|
if (process.env.NODE_ENV === 'development' || process.env.DEBUG_PROD === 'true') { |
|
|
|
mainWindow.webContents.once('dom-ready', () => { |
|
|
|
mainWindow.openDevTools() |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
// @TODO: Use 'ready-to-show' event
|
|
|
|
// https://github.com/electron/electron/blob/master/docs/api/browser-window.md#using-ready-to-show-event
|
|
|
|
mainWindow.webContents.on('did-finish-load', () => { |
|
|
|
|
|
@ -9,10 +9,6 @@ export default class MenuBuilder { |
|
|
|
} |
|
|
|
|
|
|
|
buildMenu() { |
|
|
|
if (process.env.NODE_ENV === 'development' || process.env.DEBUG_PROD === 'true') { |
|
|
|
this.setupDevelopmentEnvironment() |
|
|
|
} |
|
|
|
|
|
|
|
let template |
|
|
|
|
|
|
|
if (process.platform === 'darwin') { |
|
|
@ -58,10 +54,6 @@ export default class MenuBuilder { |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
setupDevelopmentEnvironment() { |
|
|
|
this.mainWindow.openDevTools() |
|
|
|
} |
|
|
|
|
|
|
|
buildDarwinTemplate() { |
|
|
|
const subMenuAbout = { |
|
|
|
label: 'Electron', |
|
|
|