- The
main
branch only includes the code for Building a modern Drupal theme with Storybook. - The
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+.
- Clone this repo
- Run
cd storybook
(or the directory name you used when cloning the repo) - Run
nvm install
- You need to have nvm installed. This project uses NodeJS v20.5 - Run
npm install
- This will install all the npm packages inpackage.json
- Run
npm run storybook
- Will build and launch Storybook in the browser.
by: Mario Hernandez