How to append text to multiple files using grunt-file-append
https://www.npmjs.com/package/grunt-file-append
grunt.initConfig({
file_append: {
default_options: {
files: [
{
append: "text to append",
prepend: "text to prepend",
input: '/path/to/input/file'
output: 'path/to/output/file'
}
]
}
}
})
if I write the function in this way, for appending to multiple files it cases an error.
grunt.initConfig({
file_append: {
default_options: {
files: [
{
append: "text to append",
prepend: "text to prepend",
input: './path/to/input/*.html'
output: 'path/to/output/*.html'
}
]
}
}
})
I get the following error :
Running "file_append:default_option" (file_append) task
>> Source file "./path/to/output/*.html" not found.
Warning: Task "file_append:default_option" failed. Use --force to continue.
Aborted due to warnings.
appending just to a single file works but not for multiple files, any thing i am doing wrong here.