This repo is limited to the dependencies and configuration to build CSS/JS files for a Drupal theme, with a Storybook interface for component development. A Drupal theme will need to be generated first (https://www.drupal.org/docs/core-modules-and-themes/core-themes/starterkit-theme). Then copy the files from this repo into that folder.
pnpm buildcompiles and optimizes the outputpnpm startwatches files for changes in any linked files (import from...orbackground-image:...), and compiles the results todist/. Also starts a browsersync instance with a proxy to a lando serverpnpm storybooklaunches the storybook ui in a browserpnpm build:tokensregenerates the token CSS (runs automatically before the commands above)
componentsare expected to follow the conventions from https://github.com/bryanbuchs/generator-component- Vite looks for
components/**/*.library.jsfiles and compiles each to thedistdirectory, registered as libraries for the corresponding SDC. The build exits cleanly when no entries are found. - Design tokens live in
tokens/definitions/*.jsonand compile via Style Dictionary to one CSS file per group intokens/css/(colors,themes,surfaces,typography). - Small images referenced in CSS are inlined as data-URLs in the compiled output.