Skip to content

Commit

Permalink
fix(storybook): fix schema to read projectName from config (#11098)
Browse files Browse the repository at this point in the history
  • Loading branch information
mandarini committed Jul 12, 2022
1 parent cc74de6 commit a2d9577
Show file tree
Hide file tree
Showing 14 changed files with 78 additions and 40 deletions.
7 changes: 5 additions & 2 deletions docs/generated/packages/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -1870,7 +1870,8 @@
"properties": {
"name": {
"type": "string",
"description": "The name of the project.",
"aliases": ["project", "projectName"],
"description": "Project for which to generate stories.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What's the name of the project for which you want to generate stories?",
"x-dropdown": "projects"
Expand Down Expand Up @@ -1913,8 +1914,10 @@
"properties": {
"name": {
"type": "string",
"description": "The name of the project.",
"aliases": ["project", "projectName"],
"description": "Project for which to generate Storybook configuration.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "For which project do you want to generate Storybook configuration?",
"x-dropdown": "projects"
},
"configureCypress": {
Expand Down
19 changes: 12 additions & 7 deletions docs/generated/packages/react-native.json
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,11 @@
"properties": {
"name": {
"type": "string",
"description": "Project name.",
"$default": { "$source": "argv", "index": 0 }
"aliases": ["project", "projectName"],
"description": "Project for which to generate Storybook configuration.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "For which project do you want to generate Storybook configuration?",
"x-dropdown": "projects"
},
"generateStories": {
"type": "boolean",
Expand Down Expand Up @@ -401,7 +404,8 @@
"properties": {
"project": {
"type": "string",
"description": "The project name where to add the components.",
"aliases": ["name", "projectName"],
"description": "The project where to add the components.",
"examples": ["shared-ui-component"],
"$default": { "$source": "projectName", "index": 0 },
"x-prompt": "What's the name of the project where the component lives?"
Expand Down Expand Up @@ -429,15 +433,16 @@
"$schema": "http://json-schema.org/schema",
"cli": "nx",
"$id": "NxReactNativeStorybookStories",
"title": "React native Storybook stories",
"description": "React native Storybook stories.",
"title": "Generate React Native Storybook stories",
"description": "Generate stories/specs for all components declared in a React Native project.",
"type": "object",
"properties": {
"project": {
"type": "string",
"description": "Library or application name.",
"aliases": ["name", "projectName"],
"description": "Project for which to generate stories.",
"$default": { "$source": "projectName", "index": 0 },
"x-prompt": "What's the name of the project for which you want to generate stories?"
"x-prompt": "For which project do you want to generate stories?"
}
},
"required": ["project"],
Expand Down
19 changes: 12 additions & 7 deletions docs/generated/packages/react.json
Original file line number Diff line number Diff line change
Expand Up @@ -598,8 +598,11 @@
"properties": {
"name": {
"type": "string",
"description": "Project name",
"$default": { "$source": "argv", "index": 0 }
"aliases": ["project", "projectName"],
"description": "Project for which to generate Storybook configuration.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "For which project do you want to generate Storybook configuration?",
"x-dropdown": "projects"
},
"configureCypress": {
"type": "boolean",
Expand Down Expand Up @@ -666,7 +669,8 @@
"properties": {
"project": {
"type": "string",
"description": "The project name where to add the components.",
"aliases": ["name", "projectName"],
"description": "The project where to add the components.",
"examples": ["shared-ui-component"],
"$default": { "$source": "projectName", "index": 0 },
"x-prompt": "What's name of the project where the component lives?"
Expand Down Expand Up @@ -694,15 +698,16 @@
"$schema": "http://json-schema.org/schema",
"cli": "nx",
"$id": "NxReactStorybookStories",
"title": "Create React Storybook stories",
"description": "Create stories/specs for all components declared in an app or a library.",
"title": "Generate React Storybook stories",
"description": "Generate stories/specs for all components declared in a project.",
"type": "object",
"properties": {
"project": {
"type": "string",
"description": "Library or application name.",
"aliases": ["name", "projectName"],
"description": "Project for which to generate stories.",
"$default": { "$source": "projectName", "index": 0 },
"x-prompt": "What's name of the project for which you want to generate stories?"
"x-prompt": "For which project do you want to generate stories?"
},
"generateCypressSpecs": {
"type": "boolean",
Expand Down
14 changes: 10 additions & 4 deletions docs/generated/packages/storybook.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,11 @@
"properties": {
"name": {
"type": "string",
"description": "Library or application name.",
"$default": { "$source": "argv", "index": 0 }
"aliases": ["project", "projectName"],
"description": "Project for which to generate Storybook configuration.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "For which project do you want to generate Storybook configuration?",
"x-dropdown": "projects"
},
"uiFramework": {
"type": "string",
Expand Down Expand Up @@ -170,8 +173,11 @@
"properties": {
"name": {
"type": "string",
"description": "Library or application name.",
"$default": { "$source": "argv", "index": 0 }
"aliases": ["project", "projectName"],
"description": "Project for which to generate the cypress E2E app.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "For which project do you want to generate the Cypress E2E app?",
"x-dropdown": "projects"
},
"js": {
"type": "boolean",
Expand Down
3 changes: 2 additions & 1 deletion packages/angular/src/generators/stories/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"properties": {
"name": {
"type": "string",
"description": "The name of the project.",
"aliases": ["project", "projectName"],
"description": "Project for which to generate stories.",
"$default": {
"$source": "argv",
"index": 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
"properties": {
"name": {
"type": "string",
"description": "The name of the project.",
"aliases": ["project", "projectName"],
"description": "Project for which to generate Storybook configuration.",
"$default": {
"$source": "argv",
"index": 0
},
"x-prompt": "For which project do you want to generate Storybook configuration?",
"x-dropdown": "projects"
},
"configureCypress": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"properties": {
"project": {
"type": "string",
"description": "The project name where to add the components.",
"aliases": ["name", "projectName"],
"description": "The project where to add the components.",
"examples": ["shared-ui-component"],
"$default": {
"$source": "projectName",
Expand Down
9 changes: 5 additions & 4 deletions packages/react-native/src/generators/stories/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@
"$schema": "http://json-schema.org/schema",
"cli": "nx",
"$id": "NxReactNativeStorybookStories",
"title": "React native Storybook stories",
"description": "React native Storybook stories.",
"title": "Generate React Native Storybook stories",
"description": "Generate stories/specs for all components declared in a React Native project.",
"type": "object",
"properties": {
"project": {
"type": "string",
"description": "Library or application name.",
"aliases": ["name", "projectName"],
"description": "Project for which to generate stories.",
"$default": {
"$source": "projectName",
"index": 0
},
"x-prompt": "What's the name of the project for which you want to generate stories?"
"x-prompt": "For which project do you want to generate stories?"
}
},
"required": ["project"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@
"properties": {
"name": {
"type": "string",
"description": "Project name.",
"aliases": ["project", "projectName"],
"description": "Project for which to generate Storybook configuration.",
"$default": {
"$source": "argv",
"index": 0
}
},
"x-prompt": "For which project do you want to generate Storybook configuration?",
"x-dropdown": "projects"
},
"generateStories": {
"type": "boolean",
Expand Down
3 changes: 2 additions & 1 deletion packages/react/src/generators/component-story/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"properties": {
"project": {
"type": "string",
"description": "The project name where to add the components.",
"aliases": ["name", "projectName"],
"description": "The project where to add the components.",
"examples": ["shared-ui-component"],
"$default": {
"$source": "projectName",
Expand Down
9 changes: 5 additions & 4 deletions packages/react/src/generators/stories/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@
"$schema": "http://json-schema.org/schema",
"cli": "nx",
"$id": "NxReactStorybookStories",
"title": "Create React Storybook stories",
"description": "Create stories/specs for all components declared in an app or a library.",
"title": "Generate React Storybook stories",
"description": "Generate stories/specs for all components declared in a project.",
"type": "object",
"properties": {
"project": {
"type": "string",
"description": "Library or application name.",
"aliases": ["name", "projectName"],
"description": "Project for which to generate stories.",
"$default": {
"$source": "projectName",
"index": 0
},
"x-prompt": "What's name of the project for which you want to generate stories?"
"x-prompt": "For which project do you want to generate stories?"
},
"generateCypressSpecs": {
"type": "boolean",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@
"properties": {
"name": {
"type": "string",
"description": "Project name",
"aliases": ["project", "projectName"],
"description": "Project for which to generate Storybook configuration.",
"$default": {
"$source": "argv",
"index": 0
}
},
"x-prompt": "For which project do you want to generate Storybook configuration?",
"x-dropdown": "projects"
},
"configureCypress": {
"type": "boolean",
Expand Down
7 changes: 5 additions & 2 deletions packages/storybook/src/generators/configuration/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@
"properties": {
"name": {
"type": "string",
"description": "Library or application name.",
"aliases": ["project", "projectName"],
"description": "Project for which to generate Storybook configuration.",
"$default": {
"$source": "argv",
"index": 0
}
},
"x-prompt": "For which project do you want to generate Storybook configuration?",
"x-dropdown": "projects"
},
"uiFramework": {
"type": "string",
Expand Down
7 changes: 5 additions & 2 deletions packages/storybook/src/generators/cypress-project/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@
"properties": {
"name": {
"type": "string",
"description": "Library or application name.",
"aliases": ["project", "projectName"],
"description": "Project for which to generate the cypress E2E app.",
"$default": {
"$source": "argv",
"index": 0
}
},
"x-prompt": "For which project do you want to generate the Cypress E2E app?",
"x-dropdown": "projects"
},
"js": {
"type": "boolean",
Expand Down

1 comment on commit a2d9577

@vercel
Copy link

@vercel vercel bot commented on a2d9577 Jul 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-five.vercel.app
nx.dev
nx-dev-nrwl.vercel.app
nx-dev-git-master-nrwl.vercel.app

Please sign in to comment.