Skip to content

Commit

Permalink
Shorten --window-config-file to --window-config
Browse files Browse the repository at this point in the history
  • Loading branch information
inukshuk committed Dec 4, 2020
1 parent 15f9509 commit abd1ece
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ with these additional options:
--interactive Show renderer tests in persistent window [boolean]
--url, --index Load custom URL in renderer [string]
--preload Load module during renderer preload [string]
--window-config-file Supply custom electron window options [string]
--window-config Supply custom Electron window options [string]
-W, --warnings Print renderer warnings to console [boolean]

The `window-config-file` must be a JSON file or a JavaScript module that exports the
options object. For more information, check out the
[Electron docs](https://www.electronjs.org/docs/api/browser-window#new-browserwindowoptions).
The `window-config` switch must point to a JSON file or to a JavaScript module that exports
an options object. For more information, check out the
[Electron API docs](https://www.electronjs.org/docs/api/browser-window#new-browserwindowoptions).

For the full list of available options, see `electron-mocha --help`.

Expand Down
8 changes: 4 additions & 4 deletions lib/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ exports.builder = yargs => {
group: 'Electron',
type: 'boolean'
},
'window-config-file': {
describe: 'Supply custom electron window options',
'window-config': {
describe: 'Supply custom Electron window options',
group: 'Electron',
implies: 'renderer'
}
Expand Down Expand Up @@ -173,8 +173,8 @@ exports.handler = async argv => {
}
})
} else {
const customWindowOptions = argv['window-config-file']
? require(resolve(argv['window-config-file']))
const customWindowOptions = argv['window-config']
? require(resolve(argv['window-config']))
: {}

const win = createWindow({
Expand Down

0 comments on commit abd1ece

Please sign in to comment.