knights-templar

v0.2.2
Precompile templates with browserify, or simply compile templates if in node environment
compile templates handlebars underscore browserify

knights-templar

compile ye javascript templates from doth external files in node.js.

##usage

var kt = require('knights-templar');
var template = kt.make(__dirname+'template.html', 'hbs');
var markup = template({ name: 'andy', age: 24 });

##methods

###kt.make(path,[type]) compiles content from a file located at path into a template function specified by type (defaults to Handlebars).

##types

  • 'hbs' - Handlebars
  • '_' - Underscore templates (erb-style)

##license MIT

npm i knights-templar

Metadata

  • BSD
  • Whatever
  • andy perlitch
  • released 12/5/2013

Downloads

Maintainers