2.1.0 • Published 8 years ago
catberry-jade v2.1.0
Catberry Jade Adapter
It is an adapter for Jade template engine that makes possible to use it from Catberry application.
Installation
npm install catberry-jade --save
Usage
You can use the adapter in ./browser.js, ./server.js or ./build.js as following:
const jade = require('catberry-jade');
const cat = catberry.create(config);
jade.register(cat.locator);
In fact, Catberry CLI does it for you.
Global variables
You can add global variables to Catberry application's config
, for example:
{
template: {
globals: {
globalVariableKey: 'globalVariableValue'
},
someOtherParameter: 'someOtherValue'
},
someOtherParameter: 'someOtherValue'
}
or at runtime, for example:
const templateProvider = cat.locator.resolve('templateProvider');
templateProvider.globals = templateProvider.globals || {};
templateProvider.globals.globalVariableKey = 'globalVariableValue';
Contributing
There are a lot of ways to contribute:
- Give it a star
- Join the Gitter room and leave a feedback or help with answering users' questions
- Submit a bug or a feature request
- Submit a PR
Denis Rechkunov denis.rechkunov@gmail.com