Closed donalmurtagh closed 9 years ago
Hi pal,
you could try the following:
files: [
{
expand: true,
cwd: 'config/',
src: ['template/config.js.tpl'],
dest: 'config/',
rename: function(dest, src) {
return dest + src.replace(/\.tpl$/, "");
}
}
]
@outaTiME thanks a lot, it worked like a charm. Is rename
covered in the docs? If so, I must have overlooked it
The readme
attribute is part from grunt core, take a look:
http://gruntjs.com/configuring-tasks#building-the-files-object-dynamically
I would like to replace the variables in
/template/foo.js.tpl
and store the result in/config/foo.js
. I tried the following configurationBut that results in the output file
/config/config.js/config.js
. Is it possible to specify an output filename that is different from the template file name?