将两个文件夹从一个地方复制到另一个地方的正确方法是什么:
这是我写的代码并不是正确的代码,我想要的是以下内容:
copy: {
main: {
files: [
// includes files within path
{src: ['public/modules/game'], dest: 'footboss-phonegap/www/modules/'},
// includes files within path and its sub-directories
{src: ['public/modules/core'], dest: 'footboss-phonegap/www/modules/'}
]
}
}
我想从public / modules /
复制整个文件夹名称游戏并将其复制到footboss-phonegap / www / modules /
中当前为空的目录所以最后这是footboss-phonegap / www / modules /
中的结构-game (full folder from src)
-core (full folder from src)
答案 0 :(得分:1)
嗯,这就是我需要的答案: 从cwd到src看起来应该是什么样的,当我需要传输的文件不仅是js,而是所有这些(html,css,mp3等)
copy: {
main: {
files: [
// includes files within path
{expand:true,cwd:'public/modules/game', src: ['**/*'], dest: 'footboss-phonegap/www/modules/game'},
// includes files within path and its sub-directories
{expand:true,cwd:'public/modules/core', src: ['**/*'], dest: 'footboss-phonegap/www/modules/core'}
]
}
}