Grunt's dynamically built files objects is in the structure of:
files: [
{
expand: true, // Enable dynamic expansion.
cwd: 'lib/', // Src matches are relative to this path.
src: ['**/*.js'], // Actual pattern(s) to match.
dest: 'build/', // Destination path prefix.
ext: '.min.js', // Dest filepaths will have this extension.
extDot: 'first' // Extensions in filenames begin after the first dot
},
]
But this format does not work in grunt-injector:
injector: {
options: {
destFile : 'app/static/index.html',
ignorePath: 'app/'
},
local_dependencies: {
files: [
expand: true,
cwd: 'app/static/css/',
src: ['*.css'],
dest: '/static/css',
ext: '.css'
]
}
},
Any suggestions on how I can use Grunt's specific 'dynamically built files objects' with it?
If anyone has this issue, I guess you can not use sub categories like local_dependencies.
This worked for me:
injector: {
options: {
destFile : 'app/static/index.html',
ignorePath: 'app/'
},
files: {
expand: true,
cwd: 'app/static/css/',
src: ['*.css'],
dest: 'app/static/css',
ext: '.css'
}
},