zip-wrapper
v0.0.2
Published
Unzip-wrapper companion.
Downloads
7
Readme
zip-wrapper
This package wraps the native 'zip' binary.
Install
Available on npm:
npm install zip-wrapper
Usage
zip(archivePath, options, function (err) {});
Example
var zip = require('zip-wrapper');
var options = {
target: '/folder/to/archive'
};
zip('/path/to/archive.zip', options, function (err) {
if(err) {
console.log(err.message);
return;
}
console.log('Zipped folder!');
});
The following options are available:
target
-- The target directory to compress. (Required).excludeRoot
-- By default, the target directory is added to the root of ZIP archive. Pass true to place target directory contents at the root of ZIP archive. (Default: false).