https://github.com/terrierscript/gulp-unzip
https://github.com/terrierscript/gulp-unzip
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/terrierscript/gulp-unzip
- Owner: terrierscript
- License: bsd-2-clause
- Created: 2014-03-15T17:18:05.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2019-06-02T08:25:21.000Z (over 6 years ago)
- Last Synced: 2025-02-06T13:11:30.186Z (12 months ago)
- Language: JavaScript
- Size: 857 KB
- Stars: 14
- Watchers: 4
- Forks: 8
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/terrierscript/gulp-unzip)





# gulp-unzip
> gulp plugin for unzip file.
### Usage
```bash
npm install gulp-unzip --save
```
```js
var unzip = require('gulp-unzip')
gulp.task('filter_sample', function(){
gulp.src("./download/bootstrap-3.1.1-dist.zip")
.pipe(unzip())
.pipe(gulp.dest('./tmp'))
})
```
### Options
#### filter
You can provide a `filter` option. It should be a function that gets an `entry` as an argument and returns `true` or `false`.
```js
var concat = require('gulp-concat')
var unzip = require('gulp-unzip')
var minimatch = require('minimatch')
gulp.task('filter_sample', function(){
gulp.src("./download/bootstrap-3.1.1-dist.zip")
.pipe(unzip({
filter : function(entry){
return minimatch(entry.path, "**/*.min.css")
}
}))
.pipe(concat("bootstrap.css"))
.pipe(gulp.dest('./tmp'))
})
```
#### keepEmpty
You can provide `true` or `false` in `keepEmpty` for whether you want to extract empty files from the archive or not. Defaults to `false`.
```js
gulp.task('filter_sample', function(){
gulp.src("./download/bootstrap-3.1.1-dist.zip")
.pipe(unzip({ keepEmpty : true }))
//...
})
```
### Contributors
If you want to contribute to the project, please check de [Contribution Guidelines](CONTRIBUTING.md)
**Author**
- [terrierscript (@terrierscript)](https://github.com/terrierscript)
**Maintainers**
- [Ulises Gascón (@ulisesGascon)](https://github.com/ulisesGascon)
**Contributors**
- [Joey Cozza (@joeycozza)](https://github.com/joeycozza)
- [Joe Pettersson (@Joe8Bit)](https://github.com/Joe8Bit)
- [Erik Vold (@erikvold)](https://github.com/erikvold)
- [hami (@hami-jp)](https://github.com/hami-jp)
- [Selwyn (@Selwyn)](https://github.com/Siilwyn)
- [João Moreno (@joaomoreno)](https://github.com/joaomoreno)
- [Evan Oxfeld (@EvanOxfeld)](https://github.com/EvanOxfeld)