Skip to main content
Scaffold a storybook frontend module from the upstream skeleton. The command writes modules/<name>/, renames modules/<name>/storybook.yml to modules/<name>/<name>.yml, rewrites modules/<name>/package.json, rewrites modules/<name>/playwright.config.ts, rewrites imports under modules/<name>/src/, updates modules/<name>/vite.config.ts, creates modules/<name>/src/shared/.gitkeep, and adds a root tsconfig.json path alias when that file exists.

Usage

Examples

Run with no flags to be prompted for the storybook name and design module:
Create a storybook non-interactively:
Create a storybook from a fresh skeleton download:

Options

Generated module

The copied module is marked type: "storybook" in modules/<name>/<name>.yml. When a design is chosen, the yml receives design: "<design>"; no target field is written by this command.

Rewrites

The package is renamed to @module/<name>, its Vite scripts are written with a free port starting at 3031, the Playwright config is updated to that port, imports from @module/storybook are rewritten to @module/<name>, and the Vite config is updated with the selected design alias.