You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rdrew
1440706ce3
|
6 years ago | |
---|---|---|
.. | ||
node_modules/vinyl | 6 years ago | |
index.js | 6 years ago | |
license | 6 years ago | |
package.json | 6 years ago | |
readme.md | 6 years ago |
readme.md
decompress-unzip
zip decompress plugin
Install
$ npm install --save decompress-unzip
Usage
const Decompress = require('decompress');
const decompressUnzip = require('decompress-unzip');
new Decompress()
.src('foo.zip')
.dest('dest')
.use(decompressUnzip({strip: 1}))
.run();
You can also use this plugin with gulp:
const decompressUnzip = require('decompress-unzip');
const gulp = require('gulp');
const vinylAssign = require('vinyl-assign');
gulp.task('default', () => {
return gulp.src('foo.zip')
.pipe(vinylAssign({extract: true}))
.pipe(decompressUnzip({strip: 1}))
.pipe(gulp.dest('dest'));
});
API
decompressUnzip(options)
options.strip
Type: number
Default: 0
Remove leading directory components from extracted files.
License
MIT © Kevin Mårtensson