Skip to content

Commit

Permalink
feat(storybook): add docsMode support (#2551)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxigimenez committed Feb 25, 2020
1 parent cbd5d4c commit cd25970
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 2 deletions.
8 changes: 8 additions & 0 deletions docs/angular/api-storybook/builders/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
8 changes: 8 additions & 0 deletions docs/react/api-storybook/builders/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
8 changes: 8 additions & 0 deletions docs/web/api-storybook/builders/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ export interface StorybookBuilderOptions extends JsonObject {
uiFramework: string;
config: StorybookConfig;
quiet?: boolean;
outputPath?: string;
docsMode?: boolean;
}

try {
Expand Down Expand Up @@ -85,8 +87,8 @@ async function storybookOptionMapper(
configDir: storybookConfig,
...frameworkOptions,
frameworkPresets: [...(frameworkOptions.frameworkPresets || [])],

watch: false
watch: false,
docsMode: builderOptions.docsMode
};
optionsWithFramework.config;
return optionsWithFramework;
Expand Down
5 changes: 5 additions & 0 deletions packages/storybook/src/builders/build-storybook/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down

0 comments on commit cd25970

Please sign in to comment.