cordova-js-zip
v0.0.1
Published
ZIP wrapper for cordova
Downloads
1
Readme
cordova-js-zip
==========
Promises wrapper for [Cordova zip library] (https://github.com/MobileChromeApps/zip)
Getting started
# npm install component
npm install cordova-js-zip
# install Cordova and plugins
cordova platform add [email protected]
cordova plugin add org.apache.cordova.file
cordova plugin add https://github.com/MobileChromeApps/zip.git
Usage
// require
var zipUtil = require('cordova-js-zip');
var zip = zipUtil({
retryCount: 3, // How many times to retry unzip if it fails (default is 1)
Zip: window.zip // The zip library
Promise: require('promiscuous') // Promise/A+ library
});
zip.unzip(src, dest, options) // unzip src zip file to dest directory
options.retryCount = 5 // retry unzip for 5 times before failing (defaults to 1)
The Promise option expects a library that follows the Promise/A+ spec, such as Q (github).
The Zip option expects the Cordova zip library or something that implements the same API.
Tests
npm test
Changelog
0.0.1 (20150415)
- First version with unzip functionality
Licence
Apache 2