diff options
author | James Maroney <james.maroney@gmail.com> | 2013-04-08 10:37:18 -0400 |
---|---|---|
committer | James Maroney <james.maroney@gmail.com> | 2013-04-08 10:37:18 -0400 |
commit | ca576c27fc313b63d526da49a57a0a27e10d9e97 (patch) | |
tree | 373d2793ed64bfe4dc4a9d29b27c3dc6196d02ba /bin | |
parent | 85a21f2359da7ad9e844996fbf3c2df5eea88459 (diff) | |
download | handlebars.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-x | bin/handlebars | 7 |
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('})();'); |