gruntjs / grunt-contrib-copy

Copy files and folders.
http://gruntjs.com/
MIT License
727 stars 194 forks source link

Feature request: option to use function instead of object (see below) #272

Open Ziv-Barber opened 8 years ago

Ziv-Barber commented 8 years ago

Like on many other grunt plug-ins and grunt itself:

In addition to:

grunt.initConfig({ copy: [ myCmd: { src: ... dest: ... } ] ...

I'll be able to do something like this:

grunt.initConfig({ copy: [ myCmd: function ( myParam1, myParam2 ) { return { src: ... dest: ... }; } ] ...

so I'll be able to create dynamic commands on the fly. Grunt itself has it, exec has it, shell has it, copy - no :( I can use either shell or exec to copy but I want multi-platforms support.