想知道是否可以将“复制”任务设置为选择性复制?比如说,如果一项任务想要将某些文件作为复制目标,而另一项任务可能需要将其他目标作为目标。grunt-contrib-copy:多个复制任务
我看到了“主”在所有的例子使用,但我找不到参考,如果其他的名字能够被使用,或者另一种方式来做到这一点,利用grunt-multi-dest
copy: {
main: {
files: [
{
cwd: 'src_static/img/',
src: ['**'],
dest: '../mainProject/assets/img/'
}
],
onlyIcons: {
files: [
{
cwd: 'src_static/img/icons/',
src: ['**'],
dest: '../mainProject/assets/img/icons/'
}
],
}
}
grunt.registerTask('copy-all', ['copy']);
grunt.registerTask('copy-icons', ['copy:onlyIcons']);
虽然封闭,有人问我引用我张贴的咕噜-contrib请复制网站上的一个问题一个问题:https://github.com/gruntjs/grunt-contrib-copy/issues/230#issuecomment-96467261
感谢。 -Keith