{"id":18278066,"url":"https://github.com/tanem/archiver-webpack-plugin","last_synced_at":"2025-04-05T04:30:56.369Z","repository":{"id":37318993,"uuid":"191137801","full_name":"tanem/archiver-webpack-plugin","owner":"tanem","description":":file_folder: A webpack plugin that generates zip archives.","archived":false,"fork":false,"pushed_at":"2024-04-13T17:42:00.000Z","size":4312,"stargazers_count":1,"open_issues_count":3,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-13T18:08:49.296Z","etag":null,"topics":["archive","archiver","javascript","plugin","webpack","zip"],"latest_commit_sha":null,"homepage":"https://npm.im/@tanem/archiver-webpack-plugin","language":"TypeScript","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/tanem.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null}},"created_at":"2019-06-10T09:29:38.000Z","updated_at":"2024-04-15T05:33:13.368Z","dependencies_parsed_at":"2022-07-12T12:24:56.964Z","dependency_job_id":"3f3257cf-e252-4e17-b866-438f22c95c23","html_url":"https://github.com/tanem/archiver-webpack-plugin","commit_stats":null,"previous_names":[],"tags_count":160,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanem%2Farchiver-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanem%2Farchiver-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanem%2Farchiver-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanem%2Farchiver-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tanem","download_url":"https://codeload.github.com/tanem/archiver-webpack-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247289382,"owners_count":20914463,"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":["archive","archiver","javascript","plugin","webpack","zip"],"created_at":"2024-11-05T12:22:51.248Z","updated_at":"2025-04-05T04:30:53.662Z","avatar_url":"https://github.com/tanem.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# archiver-webpack-plugin\n\n[![npm version](https://img.shields.io/npm/v/@tanem/archiver-webpack-plugin.svg?style=flat-square)](https://www.npmjs.com/package/@tanem/archiver-webpack-plugin)\n[![build status](https://img.shields.io/github/actions/workflow/status/tanem/archiver-webpack-plugin/ci.yml?branch=master\u0026style=flat-square)](https://github.com/tanem/archiver-webpack-plugin/actions?query=workflow%3ACI)\n[![coverage status](https://img.shields.io/codecov/c/github/tanem/archiver-webpack-plugin.svg?style=flat-square)](https://codecov.io/gh/tanem/archiver-webpack-plugin)\n[![npm downloads](https://img.shields.io/npm/dm/@tanem/archiver-webpack-plugin.svg?style=flat-square)](https://www.npmjs.com/package/@tanem/archiver-webpack-plugin)\n\n\u003e A webpack plugin that uses [node-archiver](https://github.com/archiverjs/node-archiver) to generate `.zip`, `.tar`, `.tar.gz`, or `jar` archives when the build is [`done`](https://webpack.js.org/api/compiler-hooks#done).\n\n## Basic Usage\n\n```js\nconst { ArchiverWebpackPlugin } = require('@tanem/archiver-webpack-plugin')\nconst path = require('path')\n\nmodule.exports = {\n  mode: 'development',\n  entry: './foo.js',\n  output: {\n    path: path.resolve(__dirname, 'dist'),\n    filename: 'foo.bundle.js',\n  },\n  plugins: [new ArchiverWebpackPlugin('zip')],\n}\n```\n\n## API\n\n**Arguments**\n\n- `format` - The archive format. One of `zip`, `tar` or `jar`.\n- `options` - _Optional_ An object containing the optional arguments defined below. Defaults to `{}`.\n  - `destpath` - _Optional_ The destination path within the archive. Defaults to `''`, which means files are output to the root of the archive.\n  - `filename` - _Optional_ The name of the archive. `'.zip'`, `'.tar'`, `'.tar.gz'` or `'.jar'` will be appended where appropriate. Defaults to the basename of the webpack output path.\n  - `formatOptions` - _Optional_ Allows fine-tuning of archiving. Defaults to [the archiver defaults](https://www.archiverjs.com/archiver).\n  - `globOptions` - _Optional_ The [glob options](https://github.com/isaacs/node-glob#options) that will change pattern matching behaviour. Defaults to the `node-glob` defaults, but sets `cwd` to the output path. Any `globOptions` passed will take precedence.\n  - `globPattern` - _Optional_ The [glob pattern](https://github.com/isaacs/node-glob#glob-primer) that determines what will be included in the archive. Defaults to `'**/*'` which will include all files in the output path.\n\n**Example**\n\n```js\nconst { ArchiverWebpackPlugin } = require('@tanem/archiver-webpack-plugin')\nconst path = require('path')\n\nmodule.exports = {\n  mode: 'development',\n  entry: './foo.js',\n  output: {\n    path: path.resolve(__dirname, 'dist'),\n    filename: 'foo.bundle.js',\n  },\n  plugins: [\n    new ArchiverWebpackPlugin('tar', {\n      destpath: 'foo',\n      filename: 'bar-baz',\n      formatOptions: { gzip: true },\n      globOptions: { dot: true, ignore: '*.map' },\n      globPattern: '*',\n    }),\n  ],\n}\n```\n\n## Installation\n\n\u003e ⚠️ This library requires webpack 4 and Node.js \u003e= 18.\n\n```\n$ npm install @tanem/archiver-webpack-plugin --save-dev\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanem%2Farchiver-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftanem%2Farchiver-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanem%2Farchiver-webpack-plugin/lists"}