patrickkettner / grunt-compile-handlebars

grunt plugin to compile static html from a handlebars plugin
MIT License
115 stars 29 forks source link

Same templates in array produce only single output #39

Closed gapipro closed 9 years ago

gapipro commented 9 years ago

Hi,

I have following configuration that uses same basic template file but applies different template data on each run and it produces only 1 output file instead of 2. (Only 'web.html' is created)

Is this a bug or am I doing something wrong?

'compile-handlebars': {
           demo:{
                template:['core/src/main/webapp/demo/index.html','core/src/main/webapp/demo/index.html'],
                templateData: [
                    {
                        dev:true,
                        state1:true
                    },
                    {
                        dev:true,
                        state2:true
                    }
                ],
                output:['core/src/main/webapp/demo/dist/web.html','core/src/main/webapp/demo/dist/web_other.html'],
                partials:['core/src/main/webapp/demo/_*.html','core/src/main/webapp/demo/_*.html']
            }
        }
gapipro commented 9 years ago

I noticed that the problem is with this line of code that returns unique list of files and because of that template is executed only once:

    var files = grunt.file.expand(config);