I need to zip the whole directory using Node.js. I am currently using node-zip, and every time the process starts, it generates an invalid ZIP file (as you can see from this Github problem ).
Is there any other, better version of Node.js that will allow me a ZIP directory?
EDIT: I ended up using archiver
writeZip = function(dir,name) { var zip = new JSZip(), code = zip.folder(dir), output = zip.generate(), filename = ['jsd-',name,'.zip'].join(''); fs.writeFileSync(baseDir + filename, output); console.log('creating ' + filename); };
sample value for parameters:
dir = /tmp/jsd-<randomstring>/ name = <randomstring>
UPDATE:. For those asking about the implementation I used, here is a link to my bootloader :
commadelimited Mar 26 '13 at 15:41 2013-03-26 15:41
source share