gulp-unzip
gulp plugin for unzip file.
simple usage
- this sample is extract all files.
var minimatch = require('minimatch')
gulp.src("./download/bootstrap-3.1.1-dist.zip")
.pipe(unzip())
.pipe(gulp.dest('./tmp'))
filter option usage.
- If you want some pattern of file in zip. you can use
filter option.
- filter function can get
entry as parameter.
sample
- below sample is extract only css and concat with
gulp-concat
var concat = require('gulp-concat')
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'))
})
entry params
entry.size
entry.type
entry.path