dotfiles/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/gulp-vinyl-zip
Cyryl Płotnicki 2f946d6200 Add .vscode
2016-09-11 10:29:13 +02:00
..
lib Add .vscode 2016-09-11 10:29:13 +02:00
node_modules Add .vscode 2016-09-11 10:29:13 +02:00
test Add .vscode 2016-09-11 10:29:13 +02:00
.npmignore Add .vscode 2016-09-11 10:29:13 +02:00
index.js Add .vscode 2016-09-11 10:29:13 +02:00
package.json Add .vscode 2016-09-11 10:29:13 +02:00
README.md Add .vscode 2016-09-11 10:29:13 +02:00

gulp-vinyl-zip

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('./'));
});