An example of using Craft CMS with Storybook Server. Put together for the "Crafting Components with Storybook" talk given at Dot All 2022.
Before you try to run things, make sure you have all the initial boxes checked.
- Run
npm install
- run
composer install
You'll also need some kind of local PHP environment, I recommend DDEV. If you have that, you can just run ddev start
to get things running. Be sure to import the seed database as well with ddev import-db -f ./seed.sql
. After seeding the database, add your user with ddev craft users/create --admin
.
- Start BrowserSync with
npm run sync
- In a separate terminal start your storybook with
npm run storybook