summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorJames Maroney <james.maroney@gmail.com>2013-04-08 10:37:18 -0400
committerJames Maroney <james.maroney@gmail.com>2013-04-08 10:37:18 -0400
commitca576c27fc313b63d526da49a57a0a27e10d9e97 (patch)
tree373d2793ed64bfe4dc4a9d29b27c3dc6196d02ba /bin
parent85a21f2359da7ad9e844996fbf3c2df5eea88459 (diff)
downloadhandlebars.js-ca576c27fc313b63d526da49a57a0a27e10d9e97.zip
handlebars.js-ca576c27fc313b63d526da49a57a0a27e10d9e97.tar.gz
handlebars.js-ca576c27fc313b63d526da49a57a0a27e10d9e97.tar.bz2
If building AMD module and compiling multiple templates, return the full
templates (or partials) hash from the AMD module
Diffstat (limited to 'bin')
-rwxr-xr-xbin/handlebars7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/handlebars b/bin/handlebars
index 1e46a35..d605e74 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('})();');