sindresorhus/opn


Do you want to work on this issue?
You can request for a bounty in order to promote it!
How to activate an app without opening a target? #153
wearhere posted onGitHub
On OS X, at least (not sure about other platforms), it is possible to use open
to bring an existing window of an app to the foreground. Example:
open -a Terminal
Is it possible to do this with this project? It seems like target
is required so I won't be able to mimic open -a Terminal
exactly. I tried passing an empty target
open('', {
app: 'Terminal'
}).catch((err) => {
debug('Could not activate Terminal:', err);
});
but this opens a new Terminal window rather than bringing the existing one to the foreground.