dtz
zip a directory manipulated by cli/promise (and callback).
Installation
yarn add dtz
Usage
CLI
Usage: dtz [options] <src> Options: -V, --version output the version number -o, --out-file <path> dest zip path -i, --ignores <filename> ignore filenames -v, --verbose -h, --help output usage information
When -o
is empty, zip will be generated next to src
.
Node.js
; const src = `./app`; // promise // async/awaitasync { const jszip = await ; const stream = res} // callback // save to disk // rename ; // "./app.zip"
API
dtz(src[, ignores, callback | outFile])
ignores
pass to recursive-readdir
as second arg.
outFile
When true
, zip will be generated next to src
.
res
instance of jszip
.
License
MIT (http://opensource.org/licenses/MIT)