Skip to content
This repository has been archived by the owner on Jun 7, 2022. It is now read-only.

Support for extend, include, if etc? #6

Open
mottihoresh opened this issue Mar 6, 2018 · 2 comments
Open

Support for extend, include, if etc? #6

mottihoresh opened this issue Mar 6, 2018 · 2 comments

Comments

@mottihoresh
Copy link
Contributor

mottihoresh commented Mar 6, 2018

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'));

@mottihoresh
Copy link
Contributor Author

OK I've found the issue, might want to update the docs.

I've added:
fractal.components.engine(twig);

right before defining the extension.

@fgm
Copy link

fgm commented Sep 13, 2020

Looks like this issue could be closed since #7 got merged ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants