mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-04-23 12:48:00 +08:00
docs: Simplify installing Storybook with npx (#5788)
Reduce two-step install to just one step (per the latest storybook docs) Change (i) `npm install -g @storybook/cli` and (ii) `sb init` to `npx -p @storybook/cli sb init` Refs: https://storybook.js.org/basics/quick-start-guide/
This commit is contained in:
committed by
Ian Sutherland
parent
0c9c97a778
commit
d72256c7f8
@@ -22,16 +22,10 @@ You can also deploy your Storybook or style guide as a static app. This way, eve
|
||||
|
||||
Storybook is a development environment for React UI components. It allows you to browse a component library, view the different states of each component, and interactively develop and test components.
|
||||
|
||||
First, install the following npm package globally:
|
||||
Run the following command inside your app’s directory:
|
||||
|
||||
```sh
|
||||
npm install -g @storybook/cli
|
||||
```
|
||||
|
||||
Then, run the following command inside your app’s directory:
|
||||
|
||||
```sh
|
||||
sb init
|
||||
npx -p @storybook/cli sb init
|
||||
```
|
||||
|
||||
After that, follow the instructions on the screen.
|
||||
|
||||
Reference in New Issue
Block a user