{"id":15042512,"url":"https://github.com/sindresorhus/gulp-zip","last_synced_at":"2025-05-14T10:11:11.894Z","repository":{"id":12704553,"uuid":"15377028","full_name":"sindresorhus/gulp-zip","owner":"sindresorhus","description":"ZIP compress files","archived":false,"fork":false,"pushed_at":"2025-01-09T03:08:14.000Z","size":63,"stargazers_count":270,"open_issues_count":8,"forks_count":48,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-04-13T06:15:00.838Z","etag":null,"topics":["compression","gulp-plugin","javascript","nodejs","zip"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sindresorhus.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/security.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"sindresorhus","open_collective":"sindresorhus","buy_me_a_coffee":"sindresorhus","custom":"https://sindresorhus.com/donate"}},"created_at":"2013-12-22T14:56:11.000Z","updated_at":"2025-01-23T10:46:32.000Z","dependencies_parsed_at":"2024-04-13T11:43:22.289Z","dependency_job_id":"909c2650-cd49-4b89-accb-646d16e3bedd","html_url":"https://github.com/sindresorhus/gulp-zip","commit_stats":{"total_commits":81,"total_committers":16,"mean_commits":5.0625,"dds":0.2592592592592593,"last_synced_commit":"3b86d6de38b3bf02976468d5c21e21ef1def0ff7"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fgulp-zip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fgulp-zip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fgulp-zip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fgulp-zip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sindresorhus","download_url":"https://codeload.github.com/sindresorhus/gulp-zip/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248670434,"owners_count":21142904,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compression","gulp-plugin","javascript","nodejs","zip"],"created_at":"2024-09-24T20:47:25.173Z","updated_at":"2025-04-13T06:15:05.997Z","avatar_url":"https://github.com/sindresorhus.png","language":"JavaScript","readme":"# gulp-zip\n\n\u003e ZIP compress files\n\n## Install\n\n```sh\nnpm install --save-dev gulp-zip\n```\n\n## Usage\n\n```js\nimport gulp from 'gulp';\nimport zip from 'gulp-zip';\n\nexport default () =\u003e (\n\tgulp.src('src/*')\n\t\t.pipe(zip('archive.zip'))\n\t\t.pipe(gulp.dest('dist'))\n);\n```\n\n## API\n\nSupports [streaming mode](https://github.com/gulpjs/gulp/blob/master/docs/API.md#optionsbuffer).\n\n### zip(filename, options?)\n\n#### filename\n\nType: `string`\n\n#### options\n\nType: `object`\n\n##### compress\n\nType: `boolean`\\\nDefault: `true`\n\n##### modifiedTime\n\nType: `Date`\\\nDefault: `undefined`\n\nOverrides the modification timestamp for all files added to the archive.\n\nTip: 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.\n\n##### buffer\n\nType: `boolean`\\\nDefault: `true`\n\nIf `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](https://nodejs.org/api/buffer.html#buffer_buffer_constants_max_length).\n\nIf `false`, the ZIP file contents will be a stream.\n\nWe use this option instead of relying on [gulp.src's `buffer` option](https://gulpjs.com/docs/en/api/src/#options) 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.\n","funding_links":["https://github.com/sponsors/sindresorhus","https://opencollective.com/sindresorhus","https://buymeacoffee.com/sindresorhus","https://sindresorhus.com/donate"],"categories":["插件","Plugins"],"sub_categories":["其他插件","Miscellaneous Plugins"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Fgulp-zip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsindresorhus%2Fgulp-zip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Fgulp-zip/lists"}