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: website/docs/en/guide/advanced/storybook.mdx
+37-40Lines changed: 37 additions & 40 deletions
Original file line number
Diff line number
Diff line change
@@ -25,11 +25,11 @@ Using React as an example, at this step you need to:
25
25
26
26
1. Install the dependencies for Storybook Rsbuild React framework. The essential ones include
27
27
28
-
-[storybook](https://www.npmjs.com/package/@storybook/addon-essentials): The Storybook core.
29
-
-[@storybook/addon-essentials](https://www.npmjs.com/package/@storybook/addon-essentials): a curated collection of addons to bring out the best of Storybook.
-[storybook-addon-rslib](https://www.npmjs.com/package/storybook-addon-rslib): This addon will make Storybook Rsbuild could derive Rsbuild configuration from Rslib config file.
32
-
The addon will automatically read the Rslib configuration and apply it to Storybook Rsbuild, ensuring that the configuration is unified. You can check the [storybook-addon-rslib](https://storybook.rsbuild.dev/guide/integrations/rslib.html) documentation for available options.
28
+
-[storybook](https://www.npmjs.com/package/storybook): The Storybook core.
29
+
-[@storybook/addon-essentials](https://www.npmjs.com/package/@storybook/addon-essentials): a curated collection of addons to bring out the best of Storybook.
-[storybook-addon-rslib](https://www.npmjs.com/package/storybook-addon-rslib): This addon will make Storybook Rsbuild could derive Rsbuild configuration from Rslib config file.
32
+
The addon will automatically read the Rslib configuration and apply it to Storybook Rsbuild, ensuring that the configuration is unified. You can check the [storybook-addon-rslib](https://storybook.rsbuild.dev/guide/integrations/rslib.html) documentation for available options.
33
33
34
34
<PackageManagerTabs
35
35
command={{
@@ -40,48 +40,48 @@ Using React as an example, at this step you need to:
40
40
}}
41
41
/>
42
42
43
-
The dependencies varies for each framework, please refer to the [Storybook Rsbuild documentation](https://storybook.rsbuild.dev/guide/framework.html) for details. In this React example, we will install [storybook-react-rsbuild](https://www.npmjs.com/package/storybook-react-rsbuild) as the framework integration.
43
+
The dependencies varies for each framework, please refer to the [Storybook Rsbuild documentation](https://storybook.rsbuild.dev/guide/framework.html) for details. In this React example, we will install [storybook-react-rsbuild](https://www.npmjs.com/package/storybook-react-rsbuild) as the framework integration.
2. Configure the Storybook configuration file `.storybook/main.js`, specify the stories and addons, and set the framework with corresponding framework integration.
Check out more details in the [Storybook Rsbuild documentation](https://storybook.rsbuild.dev/) and the [Storybook documentation](https://storybook.js.org/docs/react/get-started/introduction).
There you go, you could start and build the Storybook server with the following command:
92
+
大功告成,你可以使用以下命令启动和构建 Storybook 服务器:
93
93
94
94
```bash
95
-
npx storybook dev // development mode
96
-
npx storybook build // build static files
95
+
npx storybook dev // 开发模式
96
+
npx storybook build // 构建静态文件
97
97
```
98
98
99
-
Check out more details in the [Storybook Rsbuild documentation](https://storybook.rsbuild.dev/) and the [Storybook documentation](https://storybook.js.org/docs/react/get-started/introduction).
0 commit comments