npm install @knapsack/renderer-twig --save
In knapsack.config.js
:
The config passed into new TwigRenderer()
is passed directly to @basalt/twig-renderer
, see there for config details.
const HtmlRenderer = require('@knapsack/renderer-html');
const config = {
// rest of config here
templates: [
new TwigRenderer({
src: {
roots: ['./assets/patterns'],
namespaces: [{
id: 'components',
recursive: true,
paths: ['./assets/patterns'],
}],
}
}),
],
};
module.exports = config;