我正在运行 grunt-contrib-copy 将一组图像从一个目录复制到另一个目录。所有文件都被复制,但每个副本都使用队列中第一个文件的名称写入,所以我最终只得到一个文件。
这是我的配置:
copy: {
regImages: {
src: [
'images/*'
],
dest: 'dist/'
}
}
这是运行命令后我的 CLI 的详细输出:
Running "copy:regImages" (copy) task
Verifying property copy.regImages exists in config...OK
Files: images/favicon.png, images/favicon_dev.png, images/favicon_staging.png, images/
sprites, images/svg -> dist/
Options: encoding="utf8", processContent=false, processContentExclude=[],
timestamp=false, mode=false
Copying images/favicon.png -> dist/images/favicon.png
Reading images/favicon.png...OK
Writing dist/images/favicon.png...OK
Copying images/favicon_dev.png -> dist/images/favicon.png
Reading images/favicon_dev.png...OK
Writing dist/images/favicon.png...OK
Copying images/favicon_staging.png -> dist/images/favicon.png
Reading images/favicon_staging.png...OK
Writing dist/images/favicon.png...OK
Creating dist/images/favicon.png
Creating dist/images/favicon.png
Created 2 directories, copied 3 files
为什么不使用原始名称写入文件?