Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add background option for macOS #126

Merged
merged 4 commits into from Apr 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions index.js
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
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