Skip to content

Commit 564ef4c

Browse files
committed
allow omitting --quiet flag in heft-storybook-plugin without requiring --verbose
1 parent f8a668d commit 564ef4c

3 files changed

Lines changed: 22 additions & 1 deletion

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@rushstack/heft-storybook-plugin",
5+
"comment": "add option to control whether to pass --quiet flag",
6+
"type": "minor"
7+
}
8+
],
9+
"packageName": "@rushstack/heft-storybook-plugin"
10+
}

heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,12 @@ export interface IStorybookPluginOptions {
158158
* Specifies whether to capture the webpack stats for the storybook build by adding the `--webpack-stats-json` CLI flag.
159159
*/
160160
captureWebpackStats?: boolean;
161+
/**
162+
* Specifies whether to run storybook in quiet mode (--quiet).
163+
*
164+
* @defaultValue `true`
165+
*/
166+
quiet?: boolean;
161167
}
162168

163169
interface IRunStorybookOptions extends IPrepareStorybookOptions {
@@ -487,7 +493,7 @@ export default class StorybookPlugin implements IHeftTaskPlugin<IStorybookPlugin
487493
storybookArgs.push('--webpack-stats-json');
488494
}
489495

490-
if (!verbose) {
496+
if (options.quiet !== false && !verbose) {
491497
storybookArgs.push('--quiet');
492498
}
493499

heft-plugins/heft-storybook-plugin/src/schemas/storybook.schema.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@
3737
"title": "Specifies whether to capture the webpack stats for storybook build.",
3838
"description": "If this is true, then it will capture the webpack stats for storybook build. Defaults to false.",
3939
"type": "boolean"
40+
},
41+
"quiet": {
42+
"title": "Specifies whether to run storybook in quiet mode (--quiet).",
43+
"description": "If this is true, then it will run storybook in quiet mode. Defaults to true.",
44+
"type": "boolean"
4045
}
4146
}
4247
}

0 commit comments

Comments
 (0)