Open mottihoresh opened 6 years ago
Hi I am having some issues with the adapter, it's recognizing any of the twig syntax.
'use strict'; /* * Require the path module */ const path = require('path'); /* * Require the Fractal module */ const fractal = module.exports = require('@frctl/fractal').create(); const twigAdapter = require('@wondrousllc/fractal-twig-drupal-adapter'); const twig = twigAdapter({ handlePrefix: '@components' }); /* * Look for twig files instead of hbs files. */ fractal.components.set('ext', '.twig'); // default is '.hbs' /* * Give your project a title. */ fractal.set('project.title', 'Apricot Atomic Design System'); /* * Tell Fractal where to look for components. */ fractal.components.set('path', path.join(__dirname, 'patterns/components')); /* * Tell Fractal where to look for documentation pages. */ fractal.docs.set('path', path.join(__dirname, 'patterns/docs')); /* * Tell the Fractal web preview plugin where to look for static assets. */ fractal.web.set('static.path', path.join(__dirname, 'patterns/public'));
OK I've found the issue, might want to update the docs.
I've added: fractal.components.engine(twig);
fractal.components.engine(twig);
right before defining the extension.
Looks like this issue could be closed since #7 got merged ?
Hi I am having some issues with the adapter, it's recognizing any of the twig syntax.