You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/generated/packages/storybook/documents/storybook-7-setup.md
+9-3
Original file line number
Diff line number
Diff line change
@@ -56,11 +56,17 @@ You can generate Storybook configuration for an individual project with this com
56
56
nx g @nrwl/storybook:configuration project-name --storybook7Configuration --storybook7UiFramework=@storybook/react-webpack5
57
57
```
58
58
59
+
Make sure to use the framework-specific generators if your project is using Angular, React, Next.js or React Native: [`@nrwl/angular:storybook-configuration`](/packages/angular/generators/storybook-configuration), [`@nrwl/react:storybook-configuration`](/packages/react/generators/storybook-configuration), [`@nrwl/react-native:storybook-configuration`](/packages/react-native/generators/storybook-configuration), for example:
60
+
61
+
```shell
62
+
nx g @nrwl/angular:storybook-configuration my-angular-project --storybook7Configuration
The flag is called `storybook7betaConfiguration` for Nx versions <15.9.
61
67
{% /callout %}
62
68
63
-
In the field `storybook7UiFramework` you must choose one of the following Storybook frameworks:
69
+
If you are NOT using a framework-specific generator, in the field `storybook7UiFramework` you must choose one of the following Storybook frameworks:
64
70
65
71
-`@storybook/angular`
66
72
-`@storybook/html-webpack5`
@@ -81,15 +87,15 @@ In the field `storybook7UiFramework` you must choose one of the following Storyb
81
87
82
88
In Storybook 7, [the `framework` field in `.storybook/main.js|ts` is mandatory](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#framework-field-mandatory). You must choose one of the above frameworks when setting up your application.
83
89
84
-
If you are using one of the framework-specific generators (e.g. [`@nrwl/angular:storybook-configuration`](/packages/angular/generators/storybook-configuration), or [`@nrwl/react:storybook-configuration`](/packages/react/generators/storybook-configuration) for React and Nextjs projects, or [`@nrwl/react-native:storybook-configuration`](/packages/react-native/generators/storybook-configuration), the generator will automatically choose the correct framework for you.
90
+
If you are using one of the framework-specific generators, the generator will automatically choose the correct framework for you.
85
91
86
92
Choosing one of these frameworks will have the following effects on your workspace:
87
93
88
94
1. Nx will install all the required Storybook packages that go with it.
89
95
90
96
2. Nx will generate a root `.storybook` folder and a project-level `.storybook` folder (located under `libs/your-project/.storybook` or `apps/your-project/.storybook`) containing the essential configuration files for Storybook.
91
97
92
-
3. If you are working on an Angular, a React or a React Native project (and you choose `@storybook/angular`, `@storybook/react` or `@storybook/react-native`) the Nx generator will also generate stories for all the components in your project.
98
+
3. If you are working on an Angular, a React or a React Native project and you use one of the framework-specific generators, Nx will also generate stories for all the components in your project.
93
99
94
100
4. Nx will create new `targets` in your project's `project.json`, called `storybook` and `build-storybook`, containing all the necessary configuration to serve and build Storybook.
Copy file name to clipboardexpand all lines: docs/shared/packages/storybook/storybook-7-setup.md
+9-3
Original file line number
Diff line number
Diff line change
@@ -56,11 +56,17 @@ You can generate Storybook configuration for an individual project with this com
56
56
nx g @nrwl/storybook:configuration project-name --storybook7Configuration --storybook7UiFramework=@storybook/react-webpack5
57
57
```
58
58
59
+
Make sure to use the framework-specific generators if your project is using Angular, React, Next.js or React Native: [`@nrwl/angular:storybook-configuration`](/packages/angular/generators/storybook-configuration), [`@nrwl/react:storybook-configuration`](/packages/react/generators/storybook-configuration), [`@nrwl/react-native:storybook-configuration`](/packages/react-native/generators/storybook-configuration), for example:
60
+
61
+
```shell
62
+
nx g @nrwl/angular:storybook-configuration my-angular-project --storybook7Configuration
The flag is called `storybook7betaConfiguration` for Nx versions <15.9.
61
67
{% /callout %}
62
68
63
-
In the field `storybook7UiFramework` you must choose one of the following Storybook frameworks:
69
+
If you are NOT using a framework-specific generator, in the field `storybook7UiFramework` you must choose one of the following Storybook frameworks:
64
70
65
71
-`@storybook/angular`
66
72
-`@storybook/html-webpack5`
@@ -81,15 +87,15 @@ In the field `storybook7UiFramework` you must choose one of the following Storyb
81
87
82
88
In Storybook 7, [the `framework` field in `.storybook/main.js|ts` is mandatory](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#framework-field-mandatory). You must choose one of the above frameworks when setting up your application.
83
89
84
-
If you are using one of the framework-specific generators (e.g. [`@nrwl/angular:storybook-configuration`](/packages/angular/generators/storybook-configuration), or [`@nrwl/react:storybook-configuration`](/packages/react/generators/storybook-configuration) for React and Nextjs projects, or [`@nrwl/react-native:storybook-configuration`](/packages/react-native/generators/storybook-configuration), the generator will automatically choose the correct framework for you.
90
+
If you are using one of the framework-specific generators, the generator will automatically choose the correct framework for you.
85
91
86
92
Choosing one of these frameworks will have the following effects on your workspace:
87
93
88
94
1. Nx will install all the required Storybook packages that go with it.
89
95
90
96
2. Nx will generate a root `.storybook` folder and a project-level `.storybook` folder (located under `libs/your-project/.storybook` or `apps/your-project/.storybook`) containing the essential configuration files for Storybook.
91
97
92
-
3. If you are working on an Angular, a React or a React Native project (and you choose `@storybook/angular`, `@storybook/react` or `@storybook/react-native`) the Nx generator will also generate stories for all the components in your project.
98
+
3. If you are working on an Angular, a React or a React Native project and you use one of the framework-specific generators, Nx will also generate stories for all the components in your project.
93
99
94
100
4. Nx will create new `targets` in your project's `project.json`, called `storybook` and `build-storybook`, containing all the necessary configuration to serve and build Storybook.
0 commit comments