Copy one file to multiple folders with grunt

Is it possible to copy one file to multiple directories with Grunt? ie :

expand: true,
cwd: '<%= yeoman.app %>',
dest: '<%= yeoman.app %>/client/*',
src: 'core/index.html'

Where the * is all the subfolders inside the clients folder.

Thank you!

Upvotes: 1

Views: 558

Answers (1)

Mario Araque
Mario Araque

Reputation: 4572

It's not possible with *, you have to map any folder using files option. You do not need the expand option in this case:

files: [
  { src: 'core/index.html' dest: '<%= yeoman.app %>/folder1' },
  { src: 'core/index.html: '<%= yeoman.app %>/folder2' },
  { src: 'core/index.html' <%= yeoman.app %>: 'dest/folder3' },
]

Upvotes: 3

Related Questions