Comparing version 4.1.0 to 4.2.0
@@ -36,3 +36,3 @@ 'use strict'; | ||
zip.addEmptyDirectory(pathname, { | ||
mtime: file.stat.mtime || new Date(), | ||
mtime: opts.modifiedTime || file.stat.mtime || new Date(), | ||
mode: file.stat.mode | ||
@@ -43,3 +43,3 @@ }); | ||
compress: opts.compress, | ||
mtime: file.stat ? file.stat.mtime : new Date(), | ||
mtime: opts.modifiedTime || (file.stat ? file.stat.mtime : new Date()), | ||
mode: file.stat ? file.stat.mode : null | ||
@@ -46,0 +46,0 @@ }; |
{ | ||
"name": "gulp-zip", | ||
"version": "4.1.0", | ||
"version": "4.2.0", | ||
"description": "ZIP compress files", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -46,5 +46,14 @@ # gulp-zip [](https://travis-ci.org/sindresorhus/gulp-zip) | ||
##### modifiedTime | ||
Type: `Date`<br> | ||
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—archives that change only when the contents of their entries change, regardless of whether those entries were "touched" or regenerated. | ||
## License | ||
MIT © [Sindre Sorhus](https://sindresorhus.com) |
4574
59