gulp-vinyl-yazl
A fork of gulp-vinyl-zip
using yazl
and yauzl,
instead of libarchive.
It can also transform multiple file streams into a single ZIP file stream.
Usage
Archive → Archive
var gulp = require('gulp');
var zip = require('gulp-vinyl-yazl');
gulp.task('default', function () {
return zip.src('src.zip')
.pipe()
.pipe(zip.dest('out.zip'));
});
Archive → File System
var gulp = require('gulp');
var zip = require('gulp-vinyl-yazl');
gulp.task('default', function () {
return zip.src('src.zip')
.pipe()
.pipe(gulp.dest('out'));
});
File System → Archive
var gulp = require('gulp');
var zip = require('gulp-vinyl-yazl');
gulp.task('default', function () {
return gulp.src('src/**/*')
.pipe()
.pipe(zip.dest('out.zip'));
});
File System → Archive Stream → Disk
var gulp = require('gulp');
var zip = require('gulp-vinyl-yazl').zip;
gulp.task('default', function () {
return gulp.src('src/**/*')
.pipe()
.pipe(zip('out.zip')
.pipe()
.pipe(gulp.dest('./'));
});