我正在尝试将目录中的所有文件复制到另一个目录中,作为构建过程的一部分。它适合我明确指定的单个文件,但是当我尝试复制整个目录时,它会做一些奇怪的事情,例如复制完整的目录结构(或完全不复制)。这是我的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/" }