0.1.1 • Published 11 years ago
broccoli-ember-emblem v0.1.1
broccoli-ember-emblem
A filter for Broccoli that compiles Emblem templates and attaches them to Ember.TEMPLATES.
Installation
npm install --save-dev broccoli-ember-emblemUsage
var emblem = require('broccoli-ember-emblem');
tree = emblem(tree, options);Output Example
Ember.TEMPLATES['application'] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) { /**/ })
// ...for each `.embl` or `.emblem` file in your treeOptions
stripPathFromName
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 */