A filter for Broccoli that compiles Emblem templates and attaches them to Ember.TEMPLATES.
npm install --save-dev broccoli-ember-emblem
var emblem = require('broccoli-ember-emblem');
tree = emblem(tree, options);
Ember.TEMPLATES['application'] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) { /**/ })
// ...for each `.embl` or `.emblem` file in your tree
Depending on where you destDir is for your tree, you may want to ignore some part of that path. For example, if you have an application.emblem
file that you put in a tmpl/
directory previous to this filter, you may want to ignore that directory with this option:
emblem(tree, {
stripPathFromName: 'tmpl/'
})
Then the emblem
filter output will produce the correct template naming, such as:
Ember.TEMPLATES['application'] = /* compiled emblem function */