Broccoli Template Builder
A flexible Broccoli transform plugin for client-side templates.
Install
npm install --save broccoli-template-builder
Example
module.exports = function (broccoli) {
var compiler = require('ember-template-compiler');
var broccoliTemplateBuilder = require('broccoli-template-builder');
var templates = broccoli.makeTree('your/templates');
templates = broccoliTemplateBuilder(templates, {
extensions: ['hbs']
, outputFile: 'assets/templates.js'
, namespace: 'Ember.TEMPLATES'
, compile: function (string) {
return 'Ember.Handlebars.template('+compiler.precompile(string)+')';
}
});
return templates;
};