You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

gulp-unzip

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-unzip

gulp plugin for unzip

0.0.0
Source
npmnpm
Version published
Maintainers
1
Created
Source

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

  • If you want more info, show node-unzip

entry.size

  • get file size.

entry.type

  • get Directory or File

entry.path

  • file path in zip file.

Keywords

gulpplugin

FAQs

Package last updated on 18 Mar 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts