Small template helper component
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 1 commit ahead of Swatinem:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
README.md
component.json
index.js
package.json

README.md

template

Small template helper component

Installation

$ component install Swatinem/template

Usage

If you have collection of templates, which might be compiled by component-jade or something similar, you need to set up template to find those templates. You have to specify your projects name and template directory.

So if you have declared your templates in component.json like so:

{
	"name": "foo"
	"templates": [
		"templates/bar.jade"
	]
}

You can use template like so:

template.root = '/foo/templates';
template.locals.foo = 'bar';
template('bar', {more: 'locals'});

License

LGPLv3