Home

Awesome

edge Adapter

Use edge templates with Fractal.

Usage

Install via NPM:

npm i @jrmc/fractal-edge-adapter --save

Then configure your Fractal instance:

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