@horloge/vite-plugin-archive-clean
TypeScript icon, indicating that this package has built-in type declarations

0.0.12 • Public • Published

@horloge/vite-plugin-archive-clean

npm

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

/@horloge/vite-plugin-archive-clean/

    Package Sidebar

    Install

    npm i @horloge/vite-plugin-archive-clean

    Weekly Downloads

    1

    Version

    0.0.12

    License

    MIT

    Unpacked Size

    11.5 kB

    Total Files

    6

    Last publish

    Collaborators

    • wdlnydhcg