Skip to content

mu-lib/mu-template

Repository files navigation

µ Template

Installation

npm install mu-template --save
bower install mu-template --save

Usage

// AMD
require(["mu-template/main.js"], function(template) {
  var $template = template("<title><%= data.title %></title>");
  
  console.log($template({
    title: "Some title"
  });
});
// CJS
var $template  = require("mu-template/main")("<title><%= data.title %></title>");

console.log($template({
  title: "Some title"
});
// Global
var $template  = window["mu-template/main"]("<title><%= data.title %></title>");

console.log($template({
  title: "Some title"
});