This is a starter theme for Drupal 10.3+ that uses Vite. It supports Sass and JavaScript asset bundling for Drupal Single Directory Components.
- Install drupal/vite, drupal/twig_tweak and drupal/twig_field_value.
- Clone the repository into
web/themes/custom/PROJECT_NAME_theme
. - Install dependencies using
bun install
. - (Optional) Run
bun run prepare
to set up a pre-commit hook. This will automatically run the build step before committing changes. Skip this if you want to run the build step manually or during CI/CD. - Run
bun dev
to start the development server.
Run drush generate sdc
to scaffold a new component. The Vite configuration will pick up the generated files and modify them to work with Sass and Vite.
- Clears cache/theme registry when adding new Twig files.
- Reloads the page when a *.twig or *.theme file changes.
- SCSS/JS hot reloading.
- Generates a
ckeditor.css
file.