[英]Grunt copy / ant pattern / omit variable directory
I need copy files from folder src/plugin@xxx to dist/plugin. 我需要将文件从文件夹src / plugin @ xxx复制到dist / plugin。
Version can be changed so I want to omit version number everywhere. 版本可以更改,因此我想在任何地方都省略版本号。 I do: 我做:
files[{
cwd: 'src'
src: 'plugin@*/**/*'
dest: 'dist/plugin'
}];
But it copy my files to dist/plugin/plugin@xxx directory. 但这会将我的文件复制到dist / plugin / plugin @ xxx目录。
I want my files in dist/plugin directory (without specify xxx in grunt task). 我希望将文件放在dist / plugin目录中(在grunt任务中不指定xxx)。
You want the flatten
option. 您需要flatten
选项。 I think you also need expand
for flatten
to work: 我认为您还需要expand
以flatten
工作:
files: [ {
cwd: 'src'
src: 'plugin@*/**/*'
dest: 'dist/plugin',
expand: true,
flatten: true
} ],
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.