Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(storybook): add staticDirs object schema #8885

Merged
merged 1 commit into from Mar 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 9 additions & 1 deletion docs/generated/api-storybook/executors/storybook.md
Expand Up @@ -79,12 +79,20 @@ Type: `string`

SSL key to use for serving HTTPS.

### staticDir
### ~~staticDir~~

Type: `array`

**Deprecated:** This field has been renamed to staticDirs.

Directory where to load static files from, array of strings

### staticDirs

Type: `array`

Directory where to load static files from, array of strings or object with from, to keys

### stylePreprocessorOptions.includePaths

Type: `array`
Expand Down
32 changes: 32 additions & 0 deletions packages/storybook/src/executors/storybook/schema.json
Expand Up @@ -50,8 +50,18 @@
"staticDir": {
"type": "array",
"description": "Directory where to load static files from, array of strings",
"default": [],
"items": {
"type": "string"
},
"x-deprecated": "This field has been renamed to staticDirs."
},
"staticDirs": {
"type": "array",
"description": "Directory where to load static files from, array of strings or object with from, to keys",
"default": [],
"items": {
"$ref": "#/definitions/staticDirPattern"
}
},
"projectBuildConfig": {
Expand Down Expand Up @@ -134,6 +144,28 @@
"description": "The file to include."
}
]
},
"staticDirPattern": {
"oneOf": [
{
"type": "object",
"properties": {
"from": {
"type": "string",
"description": "From path"
},
"to": {
"type": "string",
"description": "To path"
}
},
"additionalProperties": false,
"required": ["from", "to"]
},
{
"type": "string"
}
]
}
},
"required": ["uiFramework", "config"]
Expand Down
Expand Up @@ -16,6 +16,7 @@ export interface StorybookExecutorOptions extends CommonNxStorybookConfig {
sslCert?: string;
sslKey?: string;
staticDir?: string[];
staticDirs?: string[] | { from: string; to: string }[];
watch?: boolean;
docsMode?: boolean;
}
Expand Down