q-archiver

0.0.2 • Public • Published

Q archiver

Build Status

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 --save

Usage

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

Package Sidebar

Install

npm i q-archiver

Weekly Downloads

0

Version

0.0.2

License

MIT

Last publish

Collaborators

  • hadynz