main
branch only includes the code for Building a modern Drupal theme with Storybook.card
branch includes the code for Integrating Drupal with Storybook components.This is a minimal setup of a Drupal 10 theme with Storybook support. It uses ViteJS as its build tool. The project still lacks many of the automation found in most modern front-end projects. The main objective of this project is to show how Storybook is able to render components that were written in Twig.
Note: You need NodeJS 18+ or 20+.
cd storybook
(or the directory name you used when cloning the repo)nvm install
- You need to have nvm installed. This project uses NodeJS v20.5npm install
- This will install all the npm packages in package.json
npm run storybook
- Will build and launch Storybook in the browser.by: Mario Hernandez