-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
CLI: Add --no-open flag #15739
CLI: Add --no-open flag #15739
Conversation
- Flag to enable not opening the browser (different than --ci)
Nx Cloud ReportCI ran the following commands for commit c66573a. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch
Sent with 💌 from NxCloud. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome. Thanks @yannbf ❤️
@@ -29,6 +29,7 @@ export async function getDevCli(packageJson: { | |||
.option('--ssl-key <key>', 'Provide an SSL key. (Required with --https)') | |||
.option('--smoke-test', 'Exit after successful start') | |||
.option('--ci', "CI mode (skip interactive prompts, don't open browser)") | |||
.option('--no-open', 'Do not open Storybook automatically in the browser') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be --open
? @yannbf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to commander's docs that's how you set a flag that is true by default and will be set to false when used. With this option set, --open
will not be recognized, only --no-open
. However, when would anyone ever use the flag --open
if that is true by default? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Issue: #6201
What I did
This PR adds a flag to enable not opening the browser.
How to test
git fetch && git checkout feature/cli-no-open-flag
yarn build core-server
From there, try it out
Should open Storybook on the browser:
Should not open Storybook on the browser: