Supporting Projects

Twig Extensions

Emulsify Design System uses a variety of plugins for Twig extensions:

  1. Emulsify Tools: Defines a Drush command (`drush emulsify [theme_name]) to generate sub-themes and custom Twig functions for BEM and Add Attributes.
  2. Emulsify Twig Extensions: Adds BEM and Add Attributes custom Twig extensions for Storybook (Twig.js)
  3. Twig Drupal Filters: Adds Drupal Twig extensions for Storybook (Twig.js)
  4. Emulsify Twig: (deprecated: all future development moving to Emulsify Tools) Adds BEM and Add Attributes custom Twig extensions for Drupal (Drupal module)

Note: The attach_library Twig extension was deprecated in the latest version as Storybook has a better method for handling JavaScript. That function won't throw errors in Storybook, but it will not add your JavaScript. See Compound's tabs.stories.js for an example of how to load component-specific javascript in Storybook.