feat(storybook): add docsMode support (#2551)

This commit is contained in:
Maxi Gimenez 2020-02-25 21:17:48 +01:00 committed by GitHub
parent cbd5d4c426
commit cd2597066b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 33 additions and 2 deletions

View File

@ -6,6 +6,14 @@ Builder properties can be configured in angular.json when defining the builder,
## Properties
### docsMode
Default: `false`
Type: `boolean`
Build a documentation-only site using addon-docs.
### outputPath
Type: `string`

View File

@ -7,6 +7,14 @@ Read more about how to use builders and the CLI here: https://nx.dev/react/guide
## Properties
### docsMode
Default: `false`
Type: `boolean`
Build a documentation-only site using addon-docs.
### outputPath
Type: `string`

View File

@ -7,6 +7,14 @@ Read more about how to use builders and the CLI here: https://nx.dev/web/guides/
## Properties
### docsMode
Default: `false`
Type: `boolean`
Build a documentation-only site using addon-docs.
### outputPath
Type: `string`

View File

@ -27,6 +27,8 @@ export interface StorybookBuilderOptions extends JsonObject {
uiFramework: string;
config: StorybookConfig;
quiet?: boolean;
outputPath?: string;
docsMode?: boolean;
}
try {
@ -85,8 +87,8 @@ async function storybookOptionMapper(
configDir: storybookConfig,
...frameworkOptions,
frameworkPresets: [...(frameworkOptions.frameworkPresets || [])],
watch: false
watch: false,
docsMode: builderOptions.docsMode
};
optionsWithFramework.config;
return optionsWithFramework;

View File

@ -47,6 +47,11 @@
}
]
},
"docsMode": {
"type": "boolean",
"description": "Build a documentation-only site using addon-docs.",
"default": false
},
"quiet": {
"type": "boolean",
"description": "Suppress verbose build output.",