grunt-copy-to
grunt-copy-to copied to clipboard
processContent not being called
At first I thought my processContent function was running, and not creating the desired effect. I see from output that grunt-copy-to sees processContent as undefined.
copyto: {
exampleImages: {
files: [
{
cwd: '.src/assets/examples/',
src: ['**/*.png'],
dest: 'assets/examples/',
expand: true
}
],
options: {
processContent: function(content, path) {
fs.chmod( content, 700, function(err){
if(err) throw err;
});
console.log('processing ' + content);
return content; // do something with content or return false to abort copy
},
ignore: [
'**/*.md'
]
}
}
},
$grunt --verbose copyto
Running "copyto:exampleImages" (copyto) task
Verifying property copyto.exampleImages exists in config...OK
Files: .src/assets/examples/innovative/profile-editor.png -> assets/examples/innovative/profile-editor.png
...
Options: ignore=["**/*.md"], processContent=undefined
Unchanged .src/assets/examples/innovative/profile-editor.png
...
Copied 0 files (40 unchanged), created 0 folders, ignored 0 resources