Skip to content

Swatinem/template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Small template helper component

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors