Raised: $0
0% of monthly goal Help us cross the finish line!
Goal: $12,000
Raised: $0 Goal: $12,000
0% of monthly goal Help us cross the finish line!
Sponsor DDEV

add-on registry tests last commit release

ddev-storybook

What is ddev-storybook?

This addon makes it easier to work with Storybook 7 and DDEV. It does this by:

Storybook is “a frontend workshop for building UI components”. The addon assumes the developer is correctly installed and configured Storybook using the default port (6006).

Components of the repository

Getting started

  1. Install the add-on and restart DDEV:
ddev add-on get tyler36/ddev-storybook
ddev restart
  1. Install storybook if you haven’t already. See the Storybook get started page for instructions. E.g.
    ddev exec npx storybook@latest init
    

    Note: In some cases, Storybook may not launch correctly after the initial installation. To help prevent errors like Error: spawn xdg-open ENOENT, try using the --no-dev flag during initialization:

ddev exec npx storybook@latest init --no-dev

Usage

The helper function has 2 basic usage:

Open Storybook

Use the following command to open Storybook in the default browser.

ddev storybook

Start Storybook server

Use the following command to start the Storybook server.

ddev storybook -s

Alternatively,

ddev storybook --start

This command will try to run the “storybook” script from package.json in NPM. If a yarn.lock file exists, it will run the command with YARN instead.

Removing the Add-On

ddev add-on remove tyler36/ddev-storybook

Contributing

This addon was originally created to work with Drupal and storybook contrib module. It has not been tested in other environments, although assuming Storybook defaults, it should work.

PRs, especially with automated tests are welcome.

Contributed and maintained by @tyler36