Skip to content

Commit

Permalink
If building AMD module and compiling multiple templates, return the full
Browse files Browse the repository at this point in the history
templates (or partials) hash from the AMD module
  • Loading branch information
JamesMaroney committed Apr 8, 2013
1 parent 85a21f2 commit ca576c2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bin/handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -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('})();');
Expand Down

0 comments on commit ca576c2

Please sign in to comment.