【发布时间】:2015-05-06 17:49:47
【问题描述】:
我有一个看起来像这样的文件夹结构
我想将文件夹 img/ 从 src/ 复制到 dist/ 文件夹。
我使用下面的 grunt 命令,使用grunt-contrib-copy:
copy:{
main : {
files : [
{
flatten : true,
expand: true,
src: ['src/img/*'],
dest: 'dist/img'
}
]
}
}
但我的文件夹结构最终是这样的。缺少图标文件夹中的图像:
基本上,我想做 linux 命令(当我位于项目的根目录时):
cp -r src/img dist/img
我该怎么做?
【问题讨论】:
-
grunt-cp具有 dir 的递归副本。可以试试吗?
标签: node.js gruntjs grunt-contrib-copy