Skip to content

Commit

Permalink
Merge pull request #22964 from storybookjs/fix/allow-open-flag-in-ang…
Browse files Browse the repository at this point in the history
…ular-binary

Angular: Add --open/--no-open flag to dev command
  • Loading branch information
yannbf committed Jun 7, 2023
2 parents dafe63b + 7d91a67 commit a6436a7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
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 @@ -97,6 +98,7 @@ const commandBuilder: BuilderHandlerFn<StorybookBuilderOptions> = (options, cont
sslKey,
disableTelemetry,
assets,
open,
} = options;

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

return standaloneOptions;
Expand Down
Original file line number Diff line number Diff line change
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

0 comments on commit a6436a7

Please sign in to comment.