archiver-pack
v1.0.2
Published
Archive files with node-archiver with a promise
Downloads
1,387
Readme
archiver-pack
Archive files with any supported format returning a Promise
object. It rely
in archiver for archive generation.
Installation
npm install archiver-pack
Usage
Better use full file paths.
const archiverPack = require('archiver-pack');
const files = [
'/a/b/foo',
'/a/b/bar',
'/a/b/xyz',
];
const tgzFile = '/a/b/backup.tar.gz';
const archiverOptions = {
gzip: true,
gzipOptions: {
level: 1
},
};
archiverPack('tar', files, tgzFile, archiverOptions).then(function() {
console.log('tgz file generated succesfully');
});
Tests
Use npm test
to run the tests.
Issues
If you discover a bug, please raise an issue on Github.