Is there a way to specify the permissions of a file during a grunt.file.copy(...), except using the 'fs.chmod' after copy has finished?
I will have to require the whole 'fs' module otherwise, just for changing the permissions. Will it be a lot of overhead?
grunt.file.copy
does not provide any option for that, unfortunately.But the grunt
copy
task (fromgrunt-contrib-copy
) has an option for that (options.mode
, see https://github.com/gruntjs/grunt-contrib-copy#mode).