micro-templating
v0.0.1
Published
use `micro-template` by John Resig on memory
Downloads
5
Readme
micro-templating
Respecting micro-templating
why
- Want to use micro-templating on memory
- Want to find tmpl string by NOT
document.getElementById(tpl_name)
BUTpool[tpl_name]
spec
// you can generate this pool by using `gulp-micro-templating`
this.MicroTemplates = {"foo":"<a href=\"<%= url %>\"><%= name %></a>"};
var tmpl = require('micro-templating').tmpl;
var html = tmpl("foo", {url:"https://npmjs.org/~otiai10", name:"otiai10"});
// == <a href="https://npmjs.org/~otiai10">otiai10</a>