gulp plugin for unzip
npm install gulp-unzip
!dependencies
!devDependencies
!Downloads per Week NPM
!Open PRs
!Open Issues
``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'))
})
#### 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 }))
//...
})
If you want to contribute to the project, please check de Contribution Guidelines
Author
- terrierscript (@terrierscript)
Maintainers
- Ulises Gascón (@ulisesGascon)
Contributors
- Joey Cozza (@joeycozza)
- Joe Pettersson (@Joe8Bit)
- Erik Vold (@erikvold)
- hami (@hami-jp)
- Selwyn (@Selwyn)
- João Moreno (@joaomoreno)
- Evan Oxfeld (@EvanOxfeld)