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
Examples for opening with different browsers on different platforms #177
Comments
Thanks for writing this up. See #116. I want to make it easier to launch commonly-used apps like browsers. |
@iongion Could you check the name of the .exe files? |
@iongion In that case, try to use exactly that value |
Can't something like this be used to detect paths on Windows 10 ? |
@Jolg42 can you make a PR that adds this list to the README. I have to come back to this thread so much and send it to my colleagues etc so they can double check. |
Looks like this issue is not completely needed anymore with https://github.com/sindresorhus/open/releases/tag/v8.0.0 Chrome and Firefox can now be used like this const open = require('open');
await open('https://google.com', {
app: {
name: open.apps.chrome // or open.apps.firefox
}
}); |
Should Safari and Brave also be added? |
Safari for Windows (only runs on macOS) was discontinued so that sounds like an edge case (from a multiplatform point of view), but it could also be a convenient way to reference it. Brave could be a good candidate I think, I don't know what the maintainers think about that. |
We could add Brave, Firefox Dev edition, and Chrome Canary, but not Safari. |
@germancasares maybe you can share the code and version you're using that doesn't work? |
Did anyone work on adding Brave to the list? Exposing |
I guess I'm not alone but I'm always struggling to remember exactly which app name to use on which platform.
So it looks like this:
await open('https://github.com', {app: 'APP_NAME'});
Google Chrome
Firefox
Firefox Developer Edition
Safari
Google Chrome
Firefox
Firefox Developer Edition
Brave
google-chrome
firefox
firefox-developer-edition
brave
Note that capitalization is important in all cases.
Thanks to @madebysid for figuring it out 😉
The text was updated successfully, but these errors were encountered: