I am writing grunt to concatenate files dynamically, for that I have array of files in my grunt.config variable. How to use that in grunt concat.
I am writing grunt.config('jsResources', targetConfig);
from dynamically text-replace function. Its returning as array. How to utilize it in grunt concat. I tried this way but thats not worth.
My jsResources
is array. My grunt is like
concat: {
js: {
//Concatenate all of the files in the jsResources configuration property
src: ['app/<%= jsResources %>'],
dest: 'build/views/js/combined.js',
options: {
separator: ';\n'
}
}
}
Its repalcing content but can't read content, and concatenate in my combine.js
My 'jsResources' is like ['scripts/modules/allModules.js','scripts/config/constants.js','...']
Its creating empty file combine.js
.