0.0.5 • Published 7 years ago

vash-adapter v0.0.5

Weekly downloads
1
License
ISC
Repository
-
Last release
7 years ago

Vash adapter

Use Vash templates with Fractal.

This version of the adapter has been developed and tested with Fractal v1.0.8.

Usage

Install via NPM:

npm i vash-adapter --save

Then add configuration details into your fractal.js file:

let path = require('path');
const view_ext = 'cshtml'; // or maybe 'vash' for your project?

/*
 * Set up Vash as the fractal engine through the vash-adapter.
 */
const fractal = module.exports = require('@frctl/fractal').create();
let vash_adapter = require('vash-adapter')({
    modelName: 'Model',
    helpersName: 'Html',
    settings: {
    	views: path.join(__dirname, 'components'),
    	'view engine': view_ext
    }
});

fractal.components.engine(vash_adapter);

/*
 * Tell Fractal where to look for components.
 */
fractal.components.set('path', path.join(__dirname, 'components'));
fractal.components.set('ext', '.'+view_ext);
0.0.5

7 years ago

0.0.4

8 years ago

0.0.3

8 years ago