Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/manchan4869/vitepress-plugin-compression
Vitepress plugin for packing build folder.
https://github.com/manchan4869/vitepress-plugin-compression
compression gzip zip
Last synced: about 1 month ago
JSON representation
Vitepress plugin for packing build folder.
- Host: GitHub
- URL: https://github.com/manchan4869/vitepress-plugin-compression
- Owner: manchan4869
- License: mit
- Created: 2023-02-13T12:44:08.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-06-13T08:49:55.000Z (over 1 year ago)
- Last Synced: 2024-09-22T17:37:27.364Z (3 months ago)
- Topics: compression, gzip, zip
- Language: TypeScript
- Homepage: https://vitepress-plugin-compression.manchan.top/
- Size: 34.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-vitepress-v1 - Zip Build Folder - Automatically package the build output folder using 7za.exe (:electric_plug: Plugins / Community Plugins)
README
# VitePress-Plugin-Compression
[![npm](https://img.shields.io/npm/v/vitepress-plugin-compression.svg?style=flat-square)](https://www.npmjs.com/package/vitepress-plugin-compression)
[![npm bundle size](https://img.shields.io/bundlephobia/minzip/vitepress-plugin-compression?style=flat-square)](https://bundlephobia.com/package/vitepress-plugin-compression@latest)
[![GitHub package.json version](https://img.shields.io/github/package-json/v/manchan4869/vitepress-plugin-compression?style=flat-square)](https://github.com/manchan4869/vitepress-plugin-compression/blob/main/package.json)
[![npm peer dependency version](https://img.shields.io/npm/dependency-version/vitepress-plugin-compression/peer/vitepress?style=flat-square)](https://github.com/vuejs/vitepress)
[![npm download](https://img.shields.io/npm/dm/vitepress-plugin-compression?style=flat-square)](https://www.npmjs.com/package/vitepress-plugin-compression)
[![license](https://img.shields.io/npm/l/vitepress-plugin-compression?style=flat-square)](https://github.com/manchan4869/vitepress-plugin-compression/blob/main/LICENSE)VitePress plugin for packing build folder.[Official Docs](https://vitepress-plugin-compression.manchan.top/).
English | [简体中文](./README.zh-CN.md)
## Install
```bash
# npm
npm i -D vitepress-plugin-compression# yarn
yarn add -D vitepress-plugin-compression# pnpm
pnpm add -D vitepress-plugin-compression
```## Usage
```ts
// .vitepress/config.js
import { defineConfig } from "vitepress";
import compression from "vitepress-plugin-compression";export default defineConfig({
async buildEnd() {
compression();
},
});
```## Options
```ts
export interface Options {
/**
* Input Directory
* @default `dist`
*/
inDir?: string;
/**
* Output Directory
* @default `dist`
*/
outDir?: string;
/**
* Archive Name
* @default `dist`
*/
outFileName?: string;
/**
* Archive Type
* @default `zip`
*/
type?: "7z" | "zip" | "lzma" | "cab" | "gzip" | "bzip2" | "tar";
}
```## License
MIT, see [the license file](./LICENSE)