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 --open to the CLI #792

Open
Pomax opened this issue Dec 22, 2023 · 0 comments
Open

add --open to the CLI #792

Pomax opened this issue Dec 22, 2023 · 0 comments

Comments

@Pomax
Copy link

Pomax commented Dec 22, 2023

Description

It'd be nice if there was a --open flag that just ran open-cli with the server URL, so folks don't need to either copy-paste URL strings, or set up parallel scripts that have to guess at the URL that needs to be opened.

Why

Because it's one less "tiny bother that adds up over the course of a day's worth of testing" thing folks need to do in order to just focus on their work.

Alternatives

everyone who needs it can manually install open-cli, add it to their npm script, and then run serve and open-cli in parallel. However, the "in parallel" part is not exactly trivial (with npm-run-all being effectively abandoned, and & not being cross-platform compatible syntax) and you'd have to "guess" the server URL. It's probably localhost:3000 but that's configurable so it might not be. Also, looking at the dependency list for serve, adding open-cli to that would barely have an impact on serve's footprint while making dev life just that bit easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant