作为构建过程的一部分,我试图将一个目录中的所有文件复制到另一个目录。对于我明确指定的单个文件,它工作得很好,但是当我试图复制整个目录时,它会做一些奇怪的事情,比如复制整个目录结构(或者什么都不复制)。下面是我的 GruntFile.js 中相关的部分:
copy: {
myvoice: {
files: [
{ src:"src/html/index.html", dest:"dist/myvoice/index.html" },
{ src:"src/html/css/style.css", dest:"dist/myvoice/css/style.css" },
{ src:"src/html/js/require.js", dest:"dist/myvoice/js/require.js" },
{ src:"build/myvoice/main.js", dest:"dist/myvoice/js/main.js" },
{ src:"src/html/css/fonts/*", dest:"dist/myvoice/css/fonts/" }
]
}
},
尤其是最后一句我没法开始工作的台词:
{ src:"src/html/css/fonts/*", dest:"dist/myvoice/css/fonts/" }