UNPKG

kist

Version:

Package Pipeline Processor

32 lines (31 loc) 1.21 kB
import { Action } from "../../core/pipeline/Action"; import { ActionOptionsType } from "../../types/ActionOptionsType"; /** * JavaScriptMinifyAction handles the minification of JavaScript files. * Uses Terser to reduce file size and optimize performance. */ export declare class JavaScriptMinifyAction extends Action { /** * Executes the JavaScript minification action. * * @param options - The options containing input and output file paths. * @returns A Promise that resolves when the minification process completes. * @throws {Error} If input file is missing, minification fails, or output cannot be written. */ execute(options: ActionOptionsType): Promise<void>; /** * Minifies a JavaScript file using Terser. * * @param inputPath - Path to the input JavaScript file. * @param outputPath - Path where the minified file will be saved. * @param customConfig - Custom Terser configuration. * @returns A Promise that resolves when the minification is complete. */ private minifyFile; /** * Provides a description of the action. * * @returns A string description of the action. */ describe(): string; }