dir-packer
v0.1.1
Published
A tool for packing directories into tar.gz files.
Downloads
5
Maintainers
Readme
dir-packer
A tool for packing directories into tar.gz files.
Installation
npm i --save dir-packer
Usage
Packing a directory.
const packer = require('dir-packer');
packer.pack('./src-dir', './result.tar.gz')
.then(() => console.log('The compression was successfull!'))
.catch((err) => console.log(err));
Unpacking a directory.
const packer = require('dir-packer');
/* will unpack the content of foo.tar.gz to the foo directory */
packer.unpack('./foo.tar.gz', './foo')
.then(() => console.log('The tar successfully unpacked!'))
.catch((err) => console.log(err));
License
The MIT License (MIT)