If building AMD module and compiling multiple templates, return the full

templates (or partials) hash from the AMD module
This commit is contained in:
James Maroney
2013-04-08 10:37:18 -04:00
parent 85a21f2359
commit ca576c27fc
+7
View File
@@ -184,6 +184,13 @@ argv._.forEach(function(template) {
// Output the content
if (!argv.simple) {
if (argv.amd) {
if(argv._.length > 1){
if(argv.partial){
output.push('return Handlebars.partials;\n');
} else {
output.push('return templates;\n');
}
}
output.push('});');
} else if (!argv.commonjs) {
output.push('})();');