Add SHOW_DEV_TOOLS environment variable

This commit is contained in:
Christophe HAMERLING 2020-06-03 15:54:29 +02:00 committed by Saúl Ibarra Corretgé
parent 69aea45f32
commit 212d8cb92b
2 changed files with 9 additions and 1 deletions

View File

@ -69,6 +69,12 @@ npm start
The debugger tools are available when running in dev mode and can be activated with keyboard shortcuts as defined here https://github.com/sindresorhus/electron-debug#features.
It can also be displayed automatically from the `SHOW_DEV_TOOLS` environment variable such as:
```bash
SHOW_DEV_TOOLS=true npm start
```
#### Building the production distribution
```bash

View File

@ -22,6 +22,8 @@ const path = require('path');
const URL = require('url');
const config = require('./app/features/config');
const showDevTools = Boolean(process.env.SHOW_DEV_TOOLS);
// We need this because of https://github.com/electron/electron/issues/18214
app.commandLine.appendSwitch('disable-site-isolation-trials');
@ -51,7 +53,7 @@ contextMenu({
// show them automatically though.
debug({
isEnabled: true,
showDevTools: false
showDevTools
});
/**