node压缩模块之zip-local
2017-03-20 本文已影响21人
蘇上方
安装
npm install zip-local ^0.3.4 --save-dev
demo
zipper.zip("output/release", function(error, zipped) {
if (!error) {
zipped.compress(); // compress before exporting
var buff = zipped.memory(); // get the zipped file as a Buffer
// or save the zipped file to disk
zipped.save("./" + zipName, function(error) {
if (!error) {
console.log("Ziped files successfully !");
computedHex();
}
});
} else {
console.log(error)
}
});