gulp-zip
ZIP compress files
Last updated a year ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install gulp-zip 
SYNC missed versions from official npm registry.

gulp-zip

ZIP compress files

Install

npm install --save-dev gulp-zip

Usage

import gulp from 'gulp';
import zip from 'gulp-zip';

export default () => (
	gulp.src('src/*')
		.pipe(zip('archive.zip'))
		.pipe(gulp.dest('dist'))
);

API

Supports streaming mode.

zip(filename, options?)

filename

Type: string

options

Type: object

compress

Type: boolean
Default: true

modifiedTime

Type: Date
Default: undefined

Overrides the modification timestamp for all files added to the archive.

Tip: Setting it to the same value across executions enables you to create stable archives that change only when the contents of their entries change, regardless of whether those entries were "touched" or regenerated.

buffer

Type: boolean
Default: true

If true, the resulting ZIP file contents will be a buffer. Large zip files may not be possible to buffer, depending on the size of Buffer MAX_LENGTH.

If false, the ZIP file contents will be a stream.

We use this option instead of relying on gulp.src's buffer option because we are mapping many input files to one output file and can't reliably detect what the output mode should be based on the inputs, since Vinyl streams could contain mixed streaming and buffered content.

Current Tags

  • 6.1.0                                ...           latest (a year ago)

30 Versions

  • 6.1.0                                ...           a year ago
  • 6.0.0                                ...           2 years ago
  • 5.1.0                                ...           5 years ago
  • 5.0.2                                ...           6 years ago
  • 5.0.1                                ...           7 years ago
  • 5.0.0                                ...           7 years ago
  • 4.2.0                                ...           8 years ago
  • 4.1.0                                ...           8 years ago
  • 4.0.0                                ...           9 years ago
  • 3.2.0                                ...           10 years ago
  • 3.1.0                                ...           10 years ago
  • 3.0.2                                ...           11 years ago
  • 3.0.1                                ...           11 years ago
  • 3.0.0                                ...           11 years ago
  • 2.0.3                                ...           11 years ago
  • 2.0.2                                ...           12 years ago
  • 2.0.1                                ...           12 years ago
  • 2.0.0                                ...           12 years ago
  • 1.0.0                                ...           12 years ago
  • 0.5.0                                ...           12 years ago
  • 0.4.0                                ...           12 years ago
  • 0.3.4                                ...           12 years ago
  • 0.3.3                                ...           12 years ago
  • 0.3.2                                ...           12 years ago
  • 0.3.1                                ...           12 years ago
  • 0.3.0                                ...           12 years ago
  • 0.2.0                                ...           12 years ago
  • 0.1.2                                ...           12 years ago
  • 0.1.1                                ...           12 years ago
  • 0.1.0                                ...           12 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 2
Last Day 0
Last Week 1
Last Month 1
Dependencies (4)
Dev Dependencies (8)
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org | Home |