From ca576c27fc313b63d526da49a57a0a27e10d9e97 Mon Sep 17 00:00:00 2001 From: James Maroney Date: Mon, 8 Apr 2013 10:37:18 -0400 Subject: [PATCH] If building AMD module and compiling multiple templates, return the full templates (or partials) hash from the AMD module --- bin/handlebars | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bin/handlebars b/bin/handlebars index 1e46a35f..d605e74d 100755 --- a/bin/handlebars +++ b/bin/handlebars @@ -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('})();');