I must be missing something very simple here. I\'m trying to write a function task that deals with files. The Grunt API docs mention that you can [Build the files object dynamic
You can use rename function to change file name is files object like below...
build: {
files: [{
expand: true,
cwd: 'src',
src: ['**/*.js'],
dest: 'dist',
rename: function(dest, src) {
/*
rename logic
you will have access to src and dest name and can return desirect name from this function.
*/
return src+123;
}
}]
}