I have a folder "foo", but in my target folder "target" I want to send zip version of my "foo" folder such as "foo.zip", I google and found many way for zipping files but not for folder, so how can we zip a whole folder in grunt ?
The accepted answer was throwing an error in grunt-contrib-compress 0.5.0. Try this instead:
compress: {
foo: {
options: {
archive: './foo.zip',
mode: 'zip'
},
files: [
{ src: './foo/**' }
]
}
}
From above suggestion I am able to get my answer,We can use https://github.com/gruntjs/grunt-contrib-compress/ for zipping a folder.
compress: {
zip:{
files: {
'./foo.zip': './foo/**'
}
}
}