Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/netzstrategen/fractal-twig
- Owner: netzstrategen
- Created: 2017-07-19T13:37:54.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-02-24T14:18:31.000Z (almost 4 years ago)
- Last Synced: 2024-10-02T13:10:19.591Z (4 months ago)
- Topics: drupal, fractal, pattern-library, twig, twig-adapter
- Language: JavaScript
- Homepage:
- Size: 74.2 KB
- Stars: 6
- Watchers: 16
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.md
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