Skip to content

Commit

Permalink
Add background option for macOS (#126)
Browse files Browse the repository at this point in the history
Fixes #3

Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
  • Loading branch information
sunknudsen and sindresorhus committed Apr 7, 2019
1 parent d59aa87 commit 6a2b11b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ module.exports = async (target, options) => {

options = {
wait: false,
background: false,
...options
};

Expand All @@ -40,6 +41,10 @@ module.exports = async (target, options) => {
cliArguments.push('-W');
}

if (options.background) {
cliArguments.push('--background');
}

if (options.app) {
cliArguments.push('-a', options.app);
}
Expand Down
7 changes: 7 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ Note that it waits for the app to exit, not just for the window to close.

On Windows, you have to explicitly specify an app for it to be able to wait.

##### background <sup>(macOS only)</sup>

Type: `boolean`<br>
Default: `false`

Do not bring the app to the foreground.

##### app

Type: `string | string[]`
Expand Down

0 comments on commit 6a2b11b

Please sign in to comment.