(deprecated) Catberry adapter for Jade template engine
JavaScript
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

README.md

Catberry Jade Adapter

Gitter

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:

Denis Rechkunov denis.rechkunov@gmail.com