Skip to content

Commit

Permalink
Add Application command line flag support for devtools
Browse files Browse the repository at this point in the history
  • Loading branch information
Christophe HAMERLING authored and saghul committed Jun 9, 2020
1 parent 212d8cb commit b662c93
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ It can also be displayed automatically from the `SHOW_DEV_TOOLS` environment var
SHOW_DEV_TOOLS=true npm start
```

or from the application `--show-dev-tools` command line flag.

#### Building the production distribution

```bash
Expand Down
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const path = require('path');
const URL = require('url');
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
app.commandLine.appendSwitch('disable-site-isolation-trials');
Expand Down

0 comments on commit b662c93

Please sign in to comment.