@nrwl/react:storybook-configuration

Set up Storybook for a React app or library.

Usage

nx generate storybook-configuration ...

By default, Nx will search for storybook-configuration in the default collection provisioned in workspace.json.

You can specify the collection explicitly as follows:

nx g @nrwl/react:storybook-configuration ...

Show what will be generated without writing to disk:

nx g storybook-configuration ... --dry-run

Options

configureCypress

boolean
Default: true

Run the cypress-configure generator.

cypressDirectory

string

A directory where the Cypress project will be placed. Placed at the root by default.

generateStories

boolean
Default: true

Automatically generate *.stories.ts files for components declared in this project?

generateCypressSpecs

boolean
Default: true

Automatically generate test files in the Cypress E2E app generated by the cypress-configure generator.

ignorePaths

Array<string>

Paths to ignore when looking for components.

js

boolean
Default: false

Generate JavaScript story files rather than TypeScript story files.

linter

string
Default: eslint
Accepted values: eslint, tslint

The tool to use for running lint checks.

name

Required
string

Project for which to generate Storybook configuration.

standaloneConfig

boolean

Split the project configuration into <projectRoot>/project.json rather than including it inside workspace.json.

tsConfiguration

boolean
Default: false

Configure your project with TypeScript. Generate main.ts and preview.ts files, instead of main.js and preview.js.