You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

readme.md 1005B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # gulp-zip [![Build Status](https://travis-ci.org/sindresorhus/gulp-zip.svg?branch=master)](https://travis-ci.org/sindresorhus/gulp-zip)
  2. > ZIP compress files
  3. ## Install
  4. ```
  5. $ npm install --save-dev gulp-zip
  6. ```
  7. ## Usage
  8. ```js
  9. const gulp = require('gulp');
  10. const zip = require('gulp-zip');
  11. exports.default = () => (
  12. gulp.src('src/*')
  13. .pipe(zip('archive.zip'))
  14. .pipe(gulp.dest('dist'))
  15. );
  16. ```
  17. ## API
  18. Supports [streaming mode](https://github.com/gulpjs/gulp/blob/master/docs/API.md#optionsbuffer).
  19. ### zip(filename, options?)
  20. #### filename
  21. Type: `string`
  22. #### options
  23. Type: `object`
  24. ##### compress
  25. Type: `boolean`<br>
  26. Default: `true`
  27. ##### modifiedTime
  28. Type: `Date`<br>
  29. Default: `undefined`
  30. Overrides the modification timestamp for all files added to the archive.
  31. 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.