UNPKG

@cedx/php-minifier

Version:

Minify PHP source code by removing comments and whitespace.

39 lines 1.24 kB
import { Transform, type TransformCallback } from "node:stream"; import type File from "vinyl"; /** * Minifies PHP source code by removing comments and whitespace. */ export declare class GulpPlugin extends Transform { #private; /** * Creates a new plugin. * @param options An object providing values to initialize this instance. */ constructor(options?: GulpPluginOptions); /** * Transforms input and produces output. * @param file The chunk to transform. * @param encoding The encoding type if the chunk is a string. * @param done The function to invoke when the supplied chunk has been processed. * @returns Resolves when the specified chunk has been transformed. */ _transform(file: File, encoding: BufferEncoding, done: TransformCallback): Promise<void>; } /** * Defines the options of a {@link GulpPlugin} instance. */ export type GulpPluginOptions = Partial<{ /** * The path to the PHP executable. */ binary: string; /** * The operation mode of the plugin. */ mode: "fast" | "safe"; /** * Value indicating whether to silence the plugin output. */ silent: boolean; }>; //# sourceMappingURL=GulpPlugin.d.ts.map