# rollup-plugin-compress-dist

> A plugin for rollup or vite to compress the bundle directory which supports `.zip` `.tar` `.tgz` formats.

Latest version **1.1.0** (published 2022-07-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install rollup-plugin-compress-dist
pnpm add rollup-plugin-compress-dist
yarn add rollup-plugin-compress-dist
bun add rollup-plugin-compress-dist
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2022-07-18 |
| First published | 2022-01-13 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 6.1 KB |
| Known vulnerabilities | 0 (+15 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3 |
| Maintainers | aloulou |

## Links

- npm: https://www.npmjs.com/package/rollup-plugin-compress-dist
- Repository: https://github.com/lourain/rollup-plugin-compress-dist
- Homepage: https://github.com/lourain/rollup-plugin-compress-dist#readme
- Issues: https://github.com/lourain/rollup-plugin-compress-dist/issues
- npm.io page: https://npm.io/package/rollup-plugin-compress-dist

## Dependencies (6)

- [vite](https://npm.io/package/vite.md) ^2.7.10
- [chalk](https://npm.io/package/chalk.md) ^4.1.2
- [rimraf](https://npm.io/package/rimraf.md) ^3.0.2
- [typescript](https://npm.io/package/typescript.md) ^4.5.4
- [@types/node](https://npm.io/package/@types/node.md) ^17.0.8
- [compressing](https://npm.io/package/compressing.md) ^1.5.1

## Recent versions

- 1.1.0 (latest) — 2022-07-18
- 1.0.9 — 2022-06-16
- 1.0.8 — 2022-03-07
- 1.0.7 — 2022-01-17
- 1.0.6 — 2022-01-17
- 1.0.5 — 2022-01-17
- 1.0.4 — 2022-01-17
- 1.0.3 — 2022-01-17
- 1.0.2 — 2022-01-14
- 1.0.1 — 2022-01-14
- 1.0.0 — 2022-01-13

## README

A plugin for rollup or vite to compress the bundle directory which supports `.zip` `.tar` `.tgz` formats.

## Usage

  1. download from npm
  ```
    npm install rollup-plugin-compress-dist --dev
  ```
  2. Modify configuration file of project. it would archive `dist` directory to `dist.tar.gz` by default.For example: 
  ```javascript
  //vite.config.ts
  import { defineConfig } from 'vite';
  import compressDist, { CompressOptions } from 'rollup-plugin-compress-dist';
  ...
   const compressOpts: CompressOptions<'tgz'> = {
     type: 'tgz',
     archiverName: 'dist.tar.gz',
     sourceName: 'dist',
   };
  export default defineConfig({
    plugins: [compressDist(compressOpts)],
    ...
  });
  
  ```

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