@zuke/storybook

← API reference

`@zuke/storybook` — typed [Storybook](https://storybook.js.org) CLI task

Symbols

#

StorybookBuildSettings

class
class StorybookBuildSettings extends StorybookSettings

Settings for storybook build (the static build).

MemberSignatureDoc
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.
#

StorybookDevSettings

class
class StorybookDevSettings extends StorybookSettings

Settings for storybook dev (the development server).

MemberSignatureDoc
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.
#

StorybookSettings

class
class StorybookSettings extends ToolSettings

Base for all storybook subcommand settings: the binary is storybook, with the --config-dir option every subcommand accepts.

MemberSignatureDoc
configDir configDir(path: PathLike): this Read the configuration from this directory instead of .storybook (--config-dir).
#

StorybookTasks

const
const StorybookTasks: StorybookTasksApi

Typed task functions for the storybook CLI.

#

StorybookTasksApi

interface
interface StorybookTasksApi

The shape of StorybookTasks.

MemberSignatureDoc
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.