0.0.2 • Published 11 years ago
q-archiver v0.0.2
Q archiver
Lightweight asynchronous promise-based wrapper for archive generation.
About
Promise-based wrapper based on Q and Archiver supporting asynchronous archive generation.
Install
With npm do:
npm install q-archiver --saveUsage
var QArchiver = require('q-archiver'),
archive = new QArchiver('output.zip'); // Optional archive type parameter can be passed. Defaults to 'zip'
archive
.bulk([{ expand: true, cwd: 'fixtures/', src: '*' }])
.then(function(result){
// Do something with archive file
})
.catch(function(){
// Handle any errors from any of the above steps
})
.done();API
QArchiver(filepath, format=zip, options)
Initialise a QArchiver object that will output an archived file in filepath. Optional format and options
are used to internally create an Archiver object using its default constructor of
Archiver(format, options).
.bulk(mappings)
An asynchronous wrapper method for Archiver.bulk(mappings that returns a promise.
License
MIT