1.0.0 • Published 7 years ago
directory-to-tgz v1.0.0
directory-to-tgz
Packs given directory into .tgz file
Install
$ npm install --save directory-to-tgz
Usage
directory-to-tgz allows you to pack the given directory into a .tgz file. An optional second parameter, named options, can be supplied to perform advance operations such as ignoring files, specifying specific files etc. The options parameter is same as the options parameter in tar-fs.pack function.
import directoryToTgz from 'directory-to-tgz';
import fs from 'fs';
directoryToTgz('./my-directory')
.pipe(fs.createWriteStream('my-tarball.tar.gz'));
API
directoryToTgz(directoryPath, options)
Packs given directory into .tgz file. The options parameter is same as the options parameter in tar-fs.pack function.
Lisence
MIT © Gaurav Narkhede
1.0.0
7 years ago