@horloge/vite-plugin-archive-clean
v0.0.12
Published
Vite plugin for archive folder
Downloads
19
Maintainers
Readme
@horloge/vite-plugin-archive-clean
Vite plugin for packing distribution/build folder into a zip file.
Install
npm i -D @horloge/vite-plugin-archive-clean
Usage
// vite.config.js
import { defineConfig } from "vite";
import archive from "@horloge/vite-plugin-archive-clean";
export default defineConfig({
plugins: [archive({
filesDir: './dist', //
archiveName: 'dist', // dist.tar
archiveType: 'tar', // tar
archiveAfterClean: true // archive after clean input directory
})],
});
Options
export interface Options {
/**
* Input Directory
* @default `dist`
*/
filesDir?: string;
/**
* Archive Name
* @default `dist.tar`
*/
archiveName?: string;
/**
* ArchiveType
* @default `tar`
*/
archiveType?: "tar" | "zip" | "tgz";
/**
* archive after clean Input Directory
* @default true
*/
archiveAfterClean?: boolean;
}
License
MIT, see the license file