Eliminate HIDE_DEV_TOOLS environment variable. Hide in test env.
FREEBIE
This commit is contained in:
@@ -355,8 +355,7 @@ module.exports = function(grunt) {
|
|||||||
path: path.join(__dirname, 'node_modules', '.bin', 'electron'),
|
path: path.join(__dirname, 'node_modules', '.bin', 'electron'),
|
||||||
args: [path.join(__dirname, 'main.js')],
|
args: [path.join(__dirname, 'main.js')],
|
||||||
env: {
|
env: {
|
||||||
NODE_ENV: environment,
|
NODE_ENV: environment
|
||||||
HIDE_DEV_TOOLS: true
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"storageProfile": "test",
|
"storageProfile": "test",
|
||||||
"disableAutoUpdate": true,
|
"disableAutoUpdate": true,
|
||||||
"openDevTools": true
|
"openDevTools": false
|
||||||
}
|
}
|
||||||
|
2
main.js
2
main.js
@@ -146,7 +146,7 @@ function createWindow () {
|
|||||||
mainWindow.loadURL(prepareURL([__dirname, 'background.html']));
|
mainWindow.loadURL(prepareURL([__dirname, 'background.html']));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.get('openDevTools') && !process.env.HIDE_DEV_TOOLS) {
|
if (config.get('openDevTools')) {
|
||||||
// Open the DevTools.
|
// Open the DevTools.
|
||||||
mainWindow.webContents.openDevTools()
|
mainWindow.webContents.openDevTools()
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user