0.0.3 • Published 2 years ago
vite-plugin-fflate-zip v0.0.3
Install
bun add vite-plugin-fflate-zip -D
pnpm add vite-plugin-fflate-zip -D
npm install vite-plugin-fflate-zip -D
yarn add vite-plugin-fflate-zip -DUsage
// vite.config.ts
import { defineConfig } from "vite"
import fflateZip from "vite-plugin-fflate-zip"
export default defineConfig({
plugins: [fflateZip()]
})Plugin Options
interface Options {
/**
* Input Directory
* @default `dist`
*/
inDir: string;
/**
* Output Directory
* @default `dist-zip`
*/
outDir: string;
/**
* Zip Archive Name.
* @default `${pkg.name}-${pkg.version}.zip`
*/
zipName: string;
/**
* Files to be excluded
*/
excludedFiles: string[];
/**
* After creating the zip file execute
*/
onArchived: () => void;
/**
* Execute when an error occurs
* @param err Error message
*/
onError: (err: Error) => void;
}Develop
To install dependencies:
bun installTo run dev:
bun run devTo testing at example:
bun run build:exampleTo build plugin:
bun run buildAuthors
License
MIT License © 2024-PRESENT Caven