mew-template
Version:
Precompile template to cmd module
33 lines (32 loc) • 2.33 kB
JavaScript
modulex(function () {
var template = Handlebars.template({"1":function(depth0,helpers,partials,data) {
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
return " <p>"
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+ " is a good name</p>\n";
},"3":function(depth0,helpers,partials,data) {
var lambda=this.lambda, escapeExpression=this.escapeExpression;
return " <li>"
+ escapeExpression(lambda((data && data.index), depth0))
+ ". "
+ escapeExpression(lambda(depth0, depth0))
+ "</li>\n";
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<!DOCTYPE html>\n<html>\n<head>\n <meta charset=\"utf-8\">\n <title>"
+ escapeExpression(((helper = (helper = helpers.title || (depth0 != null ? depth0.title : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"title","hash":{},"data":data}) : helper)))
+ "</title>\n</head>\n<body>\n <h1>Hello,"
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+ "</h1>\n\n <h2>Condition</h2>\n";
stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 != null ? depth0.name : depth0)) != null ? stack1.length : stack1), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data});
if (stack1 != null) { buffer += stack1; }
buffer += "\n <h2>Array</h2>\n <ul>\n";
stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.skills : depth0), {"name":"each","hash":{},"fn":this.program(3, data),"inverse":this.noop,"data":data});
if (stack1 != null) { buffer += stack1; }
return buffer + " </ul>\n</body>\n</html>\n";
},"useData":true});
return {
render: function (data) {
return template(data || {});
}
};
});