feat: storybook
This commit is contained in:
@@ -73,19 +73,23 @@ after `styles.css` — every component re-reads them:
|
||||
|
||||
## Develop
|
||||
|
||||
A live playground (every component on one page) runs via Rsbuild:
|
||||
|
||||
```bash
|
||||
npm run dev # playground at http://localhost:3000
|
||||
npm run build # build the publishable package into dist/
|
||||
npm run dev # Rsbuild playground (every component on one page) at http://localhost:3000
|
||||
npm run storybook # Storybook component explorer + docs at http://localhost:6006
|
||||
npm run build # build the publishable package into dist/
|
||||
npm run lint
|
||||
```
|
||||
|
||||
**Storybook** is the component catalogue: each component has live controls and an
|
||||
auto-generated prop table, plus a theme toggle in the toolbar. Stories live in
|
||||
`src/stories/*.stories.tsx`; config is in `.storybook/`. It is committed to git so
|
||||
anyone can `npm run storybook` and browse — but it never ships in the package.
|
||||
|
||||
## What ships
|
||||
|
||||
A git install exposes only `dist/` — built ESM + CJS, `.d.ts` types,
|
||||
`styles.css`, and `fonts.css`. The playground (`src/App.tsx`, Rsbuild config)
|
||||
is dev-only and never published.
|
||||
`styles.css`, and `fonts.css`. Everything else (`src/App.tsx`, `.storybook/`,
|
||||
stories, Rsbuild config) is dev-only and never published.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user