# vite-plugin-zip-pack

> Vite plugin for packing distribution/build folder into a zip file.

Latest version **1.2.4** (published 2024-08-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install vite-plugin-zip-pack
pnpm add vite-plugin-zip-pack
yarn add vite-plugin-zip-pack
bun add vite-plugin-zip-pack
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.4 |
| Published | 2024-08-13 |
| First published | 2022-03-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 15.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 42 |
| Author | Darko Ceranac |
| Maintainers | 7thcyborg |
| Keywords | zip, pack, vite, plugin, vite-plugin, files, archive, output, packager, bundler, compressing |

## Links

- npm: https://www.npmjs.com/package/vite-plugin-zip-pack
- Repository: https://github.com/7th-Cyborg/vite-plugin-zip-pack
- Homepage: https://github.com/7th-Cyborg/vite-plugin-zip-pack#readme
- Issues: https://github.com/7th-Cyborg/vite-plugin-zip-pack/issues
- npm.io page: https://npm.io/package/vite-plugin-zip-pack

## Dependencies (1)

- [jszip](https://npm.io/package/jszip.md) ^3.10.1

## Alternatives

- [lodash.startswith](https://npm.io/package/lodash.startswith.md) — 769.7K weekly downloads
- [@tarojs/service](https://npm.io/package/@tarojs/service.md) — 33.9K weekly downloads
- [io.extendreality.tilia.indicators.spatialtargets.unity](https://npm.io/package/io.extendreality.tilia.indicators.spatialtargets.unity.md) — 131 weekly downloads
- [@rtarojs/taro](https://npm.io/package/@rtarojs/taro.md) — 90 weekly downloads
- [node-branch-io](https://npm.io/package/node-branch-io.md) — 50 weekly downloads

## Recent versions

- 1.2.4 (latest) — 2024-08-13
- 1.2.3 — 2024-04-09
- 1.2.2 — 2024-03-08
- 1.2.1 — 2024-01-30
- 1.2.0 — 2024-01-22
- 1.1.0 — 2024-01-21
- 1.0.7 — 2023-12-14
- 1.0.6 — 2023-06-29
- 1.0.5 — 2022-12-11
- 1.0.4 — 2022-09-15
- 1.0.3 — 2022-09-15
- 1.0.2 — 2022-09-15
- 1.0.1 — 2022-03-30
- 1.0.0 — 2022-03-30

## README

# vite-plugin-zip-pack
[![npm](https://img.shields.io/npm/v/vite-plugin-zip-pack)](https://www.npmjs.com/package/vite-plugin-zip-pack)

Vite plugin for packing distribution/build folder into a zip file.

## Install

```bash
npm i -D vite-plugin-zip-pack
```

## Usage

```ts
// vite.config.js

import { defineConfig } from "vite";
import zipPack from "vite-plugin-zip-pack";

export default defineConfig({
  plugins: [zipPack()],
});
```

## Options

```ts
export interface Options {
  /**
   * Input Directory
   * @default `dist`
   */
  inDir?: string;
  /**
   * Output Directory
   * @default `dist-zip`
   */
  outDir?: string;
  /**
   * Zip Archive Name
   * @default `dist.zip`
   */
  outFileName?: string;
  /**
   * Path prefix for the files included in the zip file
   * @default ``
   */
  pathPrefix?: string;
  /**
   * Callback, which is executed after the zip file was created
   * err is only defined if the save function fails
   */
  done?: (err: Error | undefined) => void
  /**
   * Filter function equivalent to Array.prototype.filter 
   * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter
   * is executed for every files and directories
   * files and directories are only included when return ist true.
   * All files are included when function is not defined
   */
  filter?: (fileName: string, filePath: string, isDirectory: boolean) => Boolean
  /**
   * Enable logging
   * @default true
   */
  enableLogging?: boolean;
}
```
## License

MIT, see [the license file](./LICENSE)

---
_Source: https://npm.io/package/vite-plugin-zip-pack · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
