{ "name": "stories", "factory": "./src/generators/stories/stories", "schema": { "$schema": "http://json-schema.org/schema", "$id": "NxAngularStorybookStoriesGenerator", "title": "Create Storybook stories/specs", "description": "Creates Storybook stories/specs for all Angular components declared in a project.", "cli": "nx", "type": "object", "properties": { "name": { "type": "string", "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", "x-priority": "important" }, "interactionTests": { "type": "boolean", "description": "Set up Storybook interaction tests.", "x-prompt": "Do you want to set up Storybook interaction tests?", "x-priority": "important", "default": true }, "generateCypressSpecs": { "type": "boolean", "description": "Specifies whether to automatically generate `*.spec.ts` files in the Cypress e2e app generated by the `cypress-configure` generator." }, "cypressProject": { "type": "string", "description": "The Cypress project to generate the stories under. This is inferred from `name` by default." }, "skipFormat": { "description": "Skip formatting files.", "type": "boolean", "default": false, "x-priority": "internal" }, "ignorePaths": { "type": "array", "description": "Paths to ignore when looking for components.", "items": { "type": "string", "description": "Path to ignore." }, "examples": [ "apps/my-app/src/not-stories/**", "**/**/src/**/not-stories/**", "libs/my-lib/**/*.something.ts", "**/**/src/**/*.other.*", "libs/my-lib/src/not-stories/**,**/**/src/**/*.other.*,apps/my-app/**/*.something.ts" ] } }, "additionalProperties": false, "required": ["name"], "examplesFile": "This generator will generate stories for all your components in your project. The stories will be generated using [Component Story Format 3 (CSF3)](https://storybook.js.org/blog/storybook-csf3-is-here/).\n\n```bash\nnx g @nx/angular:stories project-name\n```\n\nYou can read more about how this generator works, in the [Storybook for Angular overview page](/recipes/storybook/overview-angular#auto-generate-stories).\n\nWhen running this generator, you will be prompted to provide the following:\n\n- The `name` of the project you want to generate the configuration for.\n- Whether you want to set up [Storybook interaction tests](https://storybook.js.org/docs/angular/writing-tests/interaction-testing) (`interactionTests`). If you choose `yes`, a `play` function will be added to your stories, and all the necessary dependencies will be installed. You can read more about this in the [Nx Storybook interaction tests documentation page](/packages/storybook/documents/interaction-tests).\n\nYou must provide a `name` for the generator to work.\n\nBy default, this generator will also set up [Storybook interaction tests](https://storybook.js.org/docs/angular/writing-tests/interaction-testing). If you don't want to set up Storybook interaction tests, you can pass the `--interactionTests=false` option, but it's not recommended.\n\nThere are a number of other options available. Let's take a look at some examples.\n\n## Examples\n\n### Ignore certain paths when generating stories\n\n```bash\nnx g @nx/angular:stories ui --ignorePaths=libs/ui/src/not-stories/**,**/**/src/**/*.other.*\n```\n\nThis will generate stories for all the components in the `ui` project, except for the ones in the `libs/ui/src/not-stories` directory, and also for components that their file name is of the pattern `*.other.*`.\n\nThis is useful if you have a project that contains components that are not meant to be used in isolation, but rather as part of a larger component.\n", "presets": [] }, "description": "Creates stories/specs for all components declared in a project.", "implementation": "/packages/angular/src/generators/stories/stories.ts", "aliases": [], "hidden": false, "path": "/packages/angular/src/generators/stories/schema.json", "type": "generator" }