How can I zip a folder in grunt?
gruntjs, javascript, node.js
Solution
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/**' }
]
}
}
Problem
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 ?