Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/batosai/fractal-edge-adapter
https://github.com/batosai/fractal-edge-adapter
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/batosai/fractal-edge-adapter
- Owner: batosai
- Created: 2022-07-02T21:26:05.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-08T22:03:48.000Z (over 1 year ago)
- Last Synced: 2024-07-10T12:24:23.906Z (4 months ago)
- Language: JavaScript
- Size: 69.3 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
- awesome-adonisjs - fractal-edge-adapter
README
# edge Adapter
Use [edge](https://github.com/edge-js/edge) templates with [Fractal](http://github.com/frctl/fractal).
## Usage
Install via NPM:
```bash
npm i @jrmc/fractal-edge-adapter --save
```Then configure your Fractal instance:
```js
fractal.components.set('ext', '.edge'); // look for files with a .edge file extension
fractal.components.set('edge.components.prefix', 'prefix')); // option: mount components in prefix, sample : @!prefix.button()
fractal.components.set('edge.components.path', path.join(__dirname, 'views')); // option: add specific path for edge components
fractal.components.set('edge.helpers', {
hello: () => 'world',
}); // option: specify helpers
fractal.components.engine('@jrmc/fractal-edge-adapter'); // register the edge engine adapter for your components
```