gulp-vinyl-zip

    2.5.0 • Public • Published

    gulp-vinyl-zip

    CI

    A library for creating and extracting ZIP archives from/to streams.

    Uses yazl and yauzl.

    Usage

    Archive → Archive

    var gulp = require('gulp');
    var zip = require('gulp-vinyl-zip');
    
    gulp.task('default', function () {
    	return zip.src('src.zip')
    		.pipe(/* knock yourself out */)
    		.pipe(zip.dest('out.zip'));
    });

    or

    var gulp = require('gulp');
    var zip = require('gulp-vinyl-zip');
    
    gulp.task('default', function () {
    	return gulp.src('src.zip')
    		.pipe(zip.src())
    		.pipe(/* knock yourself out */)
    		.pipe(zip.dest('out.zip'));
    });

    Archive → File System

    var gulp = require('gulp');
    var zip = require('gulp-vinyl-zip');
    
    gulp.task('default', function () {
    	return zip.src('src.zip')
    		.pipe(/* knock yourself out */)
    		.pipe(gulp.dest('out'));
    });

    File System → Archive

    var gulp = require('gulp');
    var zip = require('gulp-vinyl-zip');
    
    gulp.task('default', function () {
    	return gulp.src('src/**/*')
    		.pipe(/* knock yourself out */)
    		.pipe(zip.dest('out.zip'));
    });

    File System → Archive Stream → Disk

    var gulp = require('gulp');
    var zip = require('gulp-vinyl-zip').zip; // zip transform only
    
    gulp.task('default', function () {
    	return gulp.src('src/**/*')
    		.pipe(/* knock yourself out */)
    		.pipe(zip('out.zip'))
    		.pipe(/* knock your zip out */)
    		.pipe(gulp.dest('./'));
    });

    Install

    npm i gulp-vinyl-zip

    DownloadsWeekly Downloads

    21,406

    Version

    2.5.0

    License

    MIT

    Unpacked Size

    15.5 kB

    Total Files

    12

    Last publish

    Collaborators

    • avatar