【发布时间】:2015-09-22 21:19:05
【问题描述】:
是否可以使用 Grunt 将一个文件复制到多个目录? 即:
expand: true,
cwd: '<%= yeoman.app %>',
dest: '<%= yeoman.app %>/client/*',
src: 'core/index.html'
其中 * 是客户端文件夹中的所有子文件夹。
谢谢!
【问题讨论】:
标签: gruntjs grunt-contrib-copy
是否可以使用 Grunt 将一个文件复制到多个目录? 即:
expand: true,
cwd: '<%= yeoman.app %>',
dest: '<%= yeoman.app %>/client/*',
src: 'core/index.html'
其中 * 是客户端文件夹中的所有子文件夹。
谢谢!
【问题讨论】:
标签: gruntjs grunt-contrib-copy
* 不可能,您必须使用 files 选项映射任何文件夹。在这种情况下,您不需要 expand 选项:
files: [
{ src: 'core/index.html' dest: '<%= yeoman.app %>/folder1' },
{ src: 'core/index.html: '<%= yeoman.app %>/folder2' },
{ src: 'core/index.html' <%= yeoman.app %>: 'dest/folder3' },
]
【讨论】: