zuke.tools.storybook

← Python API reference

@zuke/storybook 1.0.0: @zuke/storybook — typed [Storybook](https://storybook.js.org) CLI task wrappers for Zuke builds.

Symbols

#

StorybookBuildSettings

class
class StorybookBuildSettings(StorybookSettings)

Settings for storybook build (the static build).

  • output_dir(path: str) -> Self

    Write the static build to this directory (--output-dir).

  • quiet_output() -> Self

    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(StorybookSettings)

Settings for storybook dev (the development server).

  • port(value: float) -> Self

    Serve on a specific port (--port).

  • host(value: str) -> Self

    Bind to a host/IP (--host).

  • no_open() -> Self

    Do not open the browser on start (--no-open).

  • ci() -> Self

    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(ToolSettings)

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

  • config_dir(path: str) -> Self

    Read the configuration from this directory instead of .storybook (--config-dir).

#

StorybookTasks

class
class StorybookTasks

Typed task functions for the storybook CLI.

  • static async dev(ctx: ServiceContext, configure: Callable[[StorybookDevSettings], StorybookDevSettings] | None=None) -> ExecResult

    Start the development server: storybook dev.

  • static async build(ctx: ServiceContext, configure: Callable[[StorybookBuildSettings], StorybookBuildSettings] | None=None) -> ExecResult

    Build the static Storybook: storybook build.