gruntjs/grunt-contrib-handlebars

Declaring multiple AMD dependencies with a function

Opened this issue · 0 comments

Hi all,

I might be doing something daft here but I would have thought that when using a function as the AMD option I would be able to define a series of dependencies, i.e. an array and not just a string.

For example (config):

amd: function (filename, ast) {
    return ['vendor/handlebars'].concat(searchAST('type', 'PartialStatement', ast).map(function (partial) {
        return 'templates/' + partial.name.original;
    }));
}

My searchAST function is fine and successfully returns the array I wanted but the output of the precompiled target is this:

define(['vendor/handlebars,templates/_e-form-checkbox,templates/_e-form-range'], function(Handlebars) {

So a super long concatenated dep path which of course doesn't exist.

Is it something I have done or is this not supported?