Add Application command line flag support for devtools

This commit is contained in:
Christophe HAMERLING 2020-06-03 18:00:24 +02:00 committed by Saúl Ibarra Corretgé
parent 212d8cb92b
commit b662c93ac7
2 changed files with 3 additions and 1 deletions

View file

@ -75,6 +75,8 @@ It can also be displayed automatically from the `SHOW_DEV_TOOLS` environment var
SHOW_DEV_TOOLS=true npm start SHOW_DEV_TOOLS=true npm start
``` ```
or from the application `--show-dev-tools` command line flag.
#### Building the production distribution #### Building the production distribution
```bash ```bash

View file

@ -22,7 +22,7 @@ const path = require('path');
const URL = require('url'); const URL = require('url');
const config = require('./app/features/config'); const config = require('./app/features/config');
const showDevTools = Boolean(process.env.SHOW_DEV_TOOLS); const showDevTools = Boolean(process.env.SHOW_DEV_TOOLS) || (process.argv.indexOf('--show-dev-tools') > -1);
// We need this because of https://github.com/electron/electron/issues/18214 // We need this because of https://github.com/electron/electron/issues/18214
app.commandLine.appendSwitch('disable-site-isolation-trials'); app.commandLine.appendSwitch('disable-site-isolation-trials');