Skip to content

Commit e3448fa

Browse files
committed
allow omitting --quiet flag in heft-storybook-plugin without requiring --verbose
1 parent 86d53ab commit e3448fa

3 files changed

Lines changed: 23 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: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,13 @@ export interface IStorybookPluginOptions {
164164
* which disables Storybook's telemetry data collection.
165165
*/
166166
disableTelemetry?: boolean;
167+
168+
/**
169+
* Specifies whether to run storybook in quiet mode (--quiet).
170+
*
171+
* @defaultValue `true`
172+
*/
173+
quiet?: boolean;
167174
}
168175

169176
interface IRunStorybookOptions extends IPrepareStorybookOptions {
@@ -493,7 +500,7 @@ export default class StorybookPlugin implements IHeftTaskPlugin<IStorybookPlugin
493500
storybookArgs.push('--webpack-stats-json');
494501
}
495502

496-
if (!verbose) {
503+
if (options.quiet !== false && !verbose) {
497504
storybookArgs.push('--quiet');
498505
}
499506

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@
4242
"title": "Specifies whether to disable Storybook telemetry.",
4343
"description": "If true, sets the STORYBOOK_DISABLE_TELEMETRY=1 environment variable when invoking the Storybook subprocess, which disables Storybook's telemetry data collection. Defaults to false.",
4444
"type": "boolean"
45+
},
46+
"quiet": {
47+
"title": "Specifies whether to run storybook in quiet mode (--quiet).",
48+
"description": "If this is true, then it will run storybook in quiet mode. Defaults to true.",
49+
"type": "boolean"
4550
}
4651
}
4752
}

0 commit comments

Comments
 (0)