Created
February 20, 2013 19:39
-
-
Save foxyblocks/4998646 to your computer and use it in GitHub Desktop.
Comparing the compiled handlebars templates from https://github.com/machty/emblem-brunch and https://github.com/chrixian/ember-precompiler-brunch .
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// EMBLEM OUTPUT | |
window.require.register("templates/application", function(exports, require, module) { | |
module.exports = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) { | |
this.compiledVersion = '1.0.rc.2'; | |
helpers = helpers || Handlebars.helpers; data = data || {}; | |
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression; | |
buffer += "<div class=\"container-fluid\"><div class=\"navbar\"><div class=\"navbar-inner\"><a class=\"brand\">Hampsters</a><ul class=\"nav\"><li class=\"active\"><a>Home</a></li><li></li><li><a>Link</a></li></ul></div></div><p>Find me in <code>app/templates/application.emblem</code>"; | |
if (stack1 = helpers.outlet) { stack1 = stack1.call(depth0, {hash:{},data:data}); } | |
else { stack1 = depth0.outlet; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } | |
buffer += escapeExpression(stack1) | |
+ "</p></div>"; | |
return buffer; | |
}); | |
}); | |
//-------------------------------------------------// | |
// OUTPUT FROM https://github.com/chrixian/ember-precompiler-brunch | |
window.require.register("templates/application", function(exports, require, module) { | |
Ember.TEMPLATES["application"] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) { | |
this.compilerInfo = [2,'>= 1.0.0-rc.3']; | |
helpers = helpers || Ember.Handlebars.helpers; data = data || {}; | |
var buffer = '', stack1, stack2, hashTypes, options, self=this, helperMissing=helpers.helperMissing; | |
function program1(depth0,data) { | |
data.buffer.push("\n Home\n "); | |
} | |
function program3(depth0,data) { | |
data.buffer.push("\n One\n "); | |
} | |
data.buffer.push("<div class=\"container-fluid\">\n <div class=\"navbar\">\n <div class=\"navbar-inner\">\n <a class=\"brand\" href=\"#\">Title</a>\n <ul class=\"nav\">\n <li class=\"active\">\n "); | |
hashTypes = {}; | |
options = {hash:{},inverse:self.noop,fn:self.program(1, program1, data),contexts:[depth0],types:["STRING"],hashTypes:hashTypes,data:data}; | |
stack2 = ((stack1 = helpers.linkTo),stack1 ? stack1.call(depth0, "index", options) : helperMissing.call(depth0, "linkTo", "index", options)); | |
if(stack2 || stack2 === 0) { data.buffer.push(stack2); } | |
data.buffer.push("\n </li>\n <li>\n "); | |
hashTypes = {}; | |
options = {hash:{},inverse:self.noop,fn:self.program(3, program3, data),contexts:[depth0],types:["STRING"],hashTypes:hashTypes,data:data}; | |
stack2 = ((stack1 = helpers.linkTo),stack1 ? stack1.call(depth0, "one", options) : helperMissing.call(depth0, "linkTo", "one", options)); | |
if(stack2 || stack2 === 0) { data.buffer.push(stack2); } | |
data.buffer.push("\n </li>\n </ul>\n </div>\n </div>\n\n <p>\n Find me in <code>templates/application.emblem</code>\n </p>\n "); | |
hashTypes = {'unescaped': "STRING"}; | |
stack2 = helpers._triageMustache.call(depth0, "outlet", {hash:{ | |
'unescaped': ("true") | |
},contexts:[depth0],types:["ID"],hashTypes:hashTypes,data:data}); | |
if(stack2 || stack2 === 0) { data.buffer.push(stack2); } | |
data.buffer.push("\n</div>\n"); | |
return buffer; | |
}); | |
module.exports = module.id; | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment