This fork allows you to use the namespaces from your theme.info.yml
file from the component-libraries
key in your Fractal instance.
Use with the Fractal integration module for Drupal:
composer require netzstrategen/drupal-twig_fractal
npm install --save git+ssh://[email protected]/netzstrategen/fractal-twig.git
or add manually in your package.json
:
{
"dependencies": {
"@netzstrategen/fractal-twig": "git+ssh://[email protected]/netzstrategen/fractal-twig.git"
}
}
in your fractal.js
const fractal = require('@frctl/fractal').create();
const twigAdapter = require('@netzstrategen/fractal-twig');
fractal.components.engine(twigAdapter);
This package is based on the work of https://github.com/WondrousLLC/twig-drupal