36 lines
835 B
Markdown
36 lines
835 B
Markdown
# `@toolctrl/storybook`
|
|
|
|
Aggregated Storybook for the boilerplate UI packages (`@toolctrl/ui`,
|
|
`@toolctrl/ui-app`, `@toolctrl/ui-subframe`, `@toolctrl/ui-mock`).
|
|
|
|
## Run locally
|
|
|
|
```bash
|
|
pnpm install
|
|
pnpm --filter @toolctrl/storybook storybook
|
|
# -> http://localhost:6006
|
|
```
|
|
|
|
## Build static site
|
|
|
|
```bash
|
|
pnpm --filter @toolctrl/storybook build-storybook
|
|
# -> apps/storybook/storybook-static
|
|
```
|
|
|
|
## Where do stories live?
|
|
|
|
Stories are **co-located** in each UI package:
|
|
|
|
```
|
|
packages/ui/src/stories/*.stories.tsx
|
|
packages/ui-app/src/stories/*.stories.tsx
|
|
packages/ui-subframe/src/stories/*.stories.tsx
|
|
packages/ui-mock/src/stories/*.stories.tsx
|
|
```
|
|
|
|
`apps/storybook/.storybook/main.ts` aggregates them via globs — adding a new
|
|
story file is enough, no manual registration.
|
|
|
|
See `docs/architecture/storybook.md` for the full guide.
|