Closed jas closed 10 years ago
This allows use of https://github.com/stefanpenner/ember-jj-abrams-resolver which can load templates from AMD modules instead of Ember.TEMPLATES
Ember.TEMPLATES
When modules.wrapper is set to "amd", Brunch handles adding the module name to the define wrapper function.
modules.wrapper
"amd"
define
Example output after being processed through Brunch. modules.nameCleaner option can be used to remove app/ module prefix.
modules.nameCleaner
app/
define("app/templates/index", [], function() { return Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) { this.compilerInfo = [4,'>= 1.0.0']; helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {}; data.buffer.push("<p>Hello, world!</p>\n"); }); });
This could be cleaner if we replace modulePrefix with the wrapper function, but I left it for backwards compatibility in case anyone is overriding it.
modulePrefix
wrapper
This allows use of https://github.com/stefanpenner/ember-jj-abrams-resolver which can load templates from AMD modules instead of
Ember.TEMPLATES
When
modules.wrapper
is set to"amd"
, Brunch handles adding the module name to thedefine
wrapper function.Example output after being processed through Brunch.
modules.nameCleaner
option can be used to removeapp/
module prefix.This could be cleaner if we replace
modulePrefix
with thewrapper
function, but I left it for backwards compatibility in case anyone is overriding it.