@zuke/storybook
`@zuke/storybook` — typed [Storybook](https://storybook.js.org) CLI task
@zuke/storybook on JSR ↗ 5 symbols
Symbols
class StorybookBuildSettings extends StorybookSettings Settings for storybook build (the static build).
| Member | Signature | Doc |
|---|---|---|
outputDir | outputDir(path: PathLike): this | Write the static build to this directory (--output-dir). |
quietOutput | quietOutput(): this | Suppress the progress output, leaving warnings and errors (--quiet). Named quietOutput because ToolSettings.quiet() already means "do not stream the process output to the terminal", which is a different thing. |
class StorybookDevSettings extends StorybookSettings Settings for storybook dev (the development server).
| Member | Signature | Doc |
|---|---|---|
port | port(value: number): this | Serve on a specific port (--port). |
host | host(value: string): this | Bind to a host/IP (--host). |
noOpen | noOpen(): this | Do not open the browser on start (--no-open). |
ci | ci(): this | Never prompt and never open a browser (--ci). A build step is not a terminal someone is watching: without this Storybook can stop on an interactive question and hang the run. |
class StorybookSettings extends ToolSettings Base for all storybook subcommand settings: the binary is storybook, with the --config-dir option every subcommand accepts.
| Member | Signature | Doc |
|---|---|---|
configDir | configDir(path: PathLike): this | Read the configuration from this directory instead of .storybook (--config-dir). |
const StorybookTasks: StorybookTasksApi Typed task functions for the storybook CLI.
interface StorybookTasksApi The shape of StorybookTasks.
| Member | Signature | Doc |
|---|---|---|
dev | dev(configure?: Configure<StorybookDevSettings>): Promise<CommandOutput> | Start the development server: storybook dev. |
build | build(configure?: Configure<StorybookBuildSettings>): Promise<CommandOutput> | Build the static Storybook: storybook build. |