This extension adds support for specific twig and Drupal functionality to @miyagi/core.
addClasssetAttribute
To use Drupal attributes in your mock files, add $drupal: true to the object.
NOTE: If you need to add additional filters, functions or tags, please refer to the miyagi documentation.
This plugin uses twig-drupal-filters, so all its functions and filters are supported.
trans/endtransplural
npm i --save-dev @miyagi/twig-drupalor
yarn add -D @miyagi/twig-drupalAdd the extension to your .miyagi.js like this:
module.exports = {
extensions: [require('@miyagi/twig-drupal')],
...
}