extract compress file with progress bar, support CLI and node API
Install as a global module
$ npm install progress-extract -g
Use extract
command to extract file
$ extract -h
Usage: extract <file>
extract file with progress bar
Options:
-V, --version output the version number
-d, --directory <dir> target dir to extract
-h, --help output usage information
Examples:
$ extract example.tar.gz
const extract = require('progress-extract')
let file = '/path/to/example.tar.gz'
let target = process.cwd()
extract(file, target)
.then(() => {
console.log('extract succeed')
}, err => {
console.log('extract failed')
})
extract(source, [destination])
- source: source file (support
.zip
,.tgz
,.tar.gz
) - destination: path where you extract to
Return Promise
MIT