What is the format to specify a single file copy for grunt copy task
copy:{
dist:{
files:[
{
expand:true,
cwd:'<%= yeoman.app %>',
dest:'<%= yeoman.dist %>/scripts/jq.min.js',
src: ['components/jq/dist/jq.min.js']
}
]
if my yeoman.app
dir is A
and yeoman.dist
is B
, this copies the file to
/b/scripts/jq.min.js/components/jq/dist/jq.min.js
what I want is copy it as /b/scripts/jq.min.js
how can I do this.
EDIT: I see an issue which implements the support. https://github.com/gruntjs/grunt-contrib-copy/issues/3
Does this work?
copy: {
dev: {
files: [{
cwd: '<%= yeoman.app %>/components/jq/dist/',
src: 'jq.min.js',
dest: '<%= yeoman.dist %>/scripts/',
expand: true
}]
}
}
Copy multiple source file locations to a single destination folder use flatten.
copy: {
dev: {
files: [{
cwd: '<%= yeoman.app %>',
src: ['/components/jq/dist/jq.min.js','/components/jq/dist/jq2.min.js', '/components/bs/dist/bs.js'],
dest: '<%= yeoman.dist %>/scripts/',
expand: true,
flatten: true
}]
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With