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

Angular: Add --open/--no-open flag to dev command #22964

Merged
merged 1 commit into from
Jun 7, 2023
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
Expand Up @@ -30,7 +30,6 @@ addToGlobalContext('cliVersion', versions.storybook);
export type StorybookBuilderOptions = JsonObject & {
browserTarget?: string | null;
tsConfig?: string;
docs: boolean;
compodoc: boolean;
compodocArgs: string[];
styles?: StyleElement[];
Expand All @@ -50,6 +49,8 @@ export type StorybookBuilderOptions = JsonObject & {
| 'ci'
| 'quiet'
| 'disableTelemetry'
| 'open'
| 'docs'
>;

export type StorybookBuilderOutput = JsonObject & BuilderOutput & {};
Expand Down Expand Up @@ -93,6 +94,7 @@ const commandBuilder: BuilderHandlerFn<StorybookBuilderOptions> = (options, cont
sslKey,
disableTelemetry,
assets,
open,
} = options;

const standaloneOptions: StandaloneOptions = {
Expand All @@ -117,6 +119,7 @@ const commandBuilder: BuilderHandlerFn<StorybookBuilderOptions> = (options, cont
...(assets ? { assets } : {}),
},
tsConfig,
open,
};

return standaloneOptions;
Expand Down
Expand Up @@ -56,6 +56,11 @@
"description": "CI mode (skip interactive prompts, don't open browser).",
"default": false
},
"open": {
"type": "boolean",
"description": "Whether to open Storybook automatically in the browser.",
"default": true
},
"quiet": {
"type": "boolean",
"description": "Suppress verbose build output.",
Expand Down