Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

precompiling handlebars templates with ember.js

I'd love to precompile my ember templates as part of my build process - when I try to use the ember-precompile tool, the resulting function contains the template data and adds that to a renderbuffer object, but returns an empty string resulting in nothing being displayed.

Ember.TEMPLATES["ins"] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) {
helpers = helpers || Ember.Handlebars.helpers;
  var buffer = '', stack1, stack2, stack3, foundHelper, tmp1, self=this, escapeExpression=this.escapeExpression;



  data.buffer.push("    <script type=\"text/x-handlebars\" data-template-name=\"FramesInstructions\">\n      Instructions - Click on the frames in the correct order!<br>\n      <a ");
  stack1 = depth0;
  stack2 = "watchCommercial";
  stack3 = helpers.action;
  tmp1 = {};
   debugger
  tmp1.hash = {};
  tmp1.contexts = [];
  tmp1.contexts.push(stack1);
  tmp1.data = data;
  stack1 = stack3.call(depth0, stack2, tmp1);
  data.buffer.push(escapeExpression(stack1) + "> START </a>\n    </script>\n");
  return buffer;
});
like image 771
gone Avatar asked Nov 04 '22 09:11

gone


1 Answers

I left the script tags around the template. DUR

like image 63
gone Avatar answered Jan 04 '23 15:01

gone