Skip to content

Instantly share code, notes, and snippets.

@chenxsan
Created January 10, 2014 13:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chenxsan/8352178 to your computer and use it in GitHub Desktop.
Save chenxsan/8352178 to your computer and use it in GitHub Desktop.
Grunt 自动编译的 Handlebars.js 模板
this["JST"]["js/person.handlebars"] = Handlebars.template(function (Handlebars, depth0, helpers, partials, data) {
this.compilerInfo = [4, '>= 1.0.0'];
helpers = this.merge(helpers, Handlebars.helpers);
data = data || {};
var buffer = "",
stack1, functionType = "function",
escapeExpression = this.escapeExpression;
buffer += "<table>\n <tr>\n <td>This is ";
if (stack1 = helpers.firstname) {
stack1 = stack1.call(depth0, {
hash: {},
data: data
});
} else {
stack1 = (depth0 && depth0.firstname);
stack1 = typeof stack1 === functionType ? stack1.call(depth0, {
hash: {},
data: data
}) : stack1;
}
buffer += escapeExpression(stack1) + " ";
if (stack1 = helpers.lastname) {
stack1 = stack1.call(depth0, {
hash: {},
data: data
});
} else {
stack1 = (depth0 && depth0.lastname);
stack1 = typeof stack1 === functionType ? stack1.call(depth0, {
hash: {},
data: data
}) : stack1;
}
buffer += escapeExpression(stack1) + "</td>\n </tr>\n</table>\n";
return buffer;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment