diff --git a/bin/handlebars b/bin/handlebars index 61886dac..1e46a35f 100755 --- a/bin/handlebars +++ b/bin/handlebars @@ -168,8 +168,10 @@ function processTemplate(template, root) { if (argv.simple) { output.push(handlebars.precompile(data, options) + '\n'); } else if (argv.partial) { + if(argv.amd && argv._.length == 1){ output.push('return '); } output.push('Handlebars.partials[\'' + template + '\'] = template(' + handlebars.precompile(data, options) + ');\n'); } else { + if(argv.amd && argv._.length == 1){ output.push('return '); } output.push('templates[\'' + template + '\'] = template(' + handlebars.precompile(data, options) + ');\n'); } }