Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/netzstrategen/fractal-twig

Re-use Twig templates within Fractal.
https://github.com/netzstrategen/fractal-twig

drupal fractal pattern-library twig twig-adapter

Last synced: 4 months ago
JSON representation

Re-use Twig templates within Fractal.

Awesome Lists containing this project

README

        

# Fractal Twig Drupal adapter

This fork allows you to use the namespaces from your `theme.info.yml` file from the `component-libraries` key in your Fractal instance.

## Requirements & Usage

Use with the [Fractal integration module for Drupal](https://github.com/netzstrategen/drupal-twig_fractal):

```sh
composer require netzstrategen/drupal-twig_fractal
```

## Setup

```sh
npm install --save git+ssh://[email protected]/netzstrategen/fractal-twig.git
```

or add manually in your `package.json`:

```json
{
"dependencies": {
"@netzstrategen/fractal-twig": "git+ssh://[email protected]/netzstrategen/fractal-twig.git"
}
}
```

in your `fractal.js`

```js
const fractal = require('@frctl/fractal').create();
const twigAdapter = require('@netzstrategen/fractal-twig');
fractal.components.engine(twigAdapter);
```

## Credits
This package is based on the work of https://github.com/WondrousLLC/twig-drupal