html-minifier
Version:
Highly effective, super-configurable, well-tested web page minifier
50 lines • 1.69 kB
TypeScript
/**
* Preset configurations
*
* Presets provide curated option sets for common use cases:
* - `conservative`: Safe minification suitable for most projects
* - `comprehensive`: Aggressive minification for maximum file size reduction
*/
export declare const presets: {
conservative: {
caseSensitive: boolean;
collapseBooleanAttributes: boolean;
collapseWhitespace: boolean;
conservativeCollapse: boolean;
preserveLineBreaks: boolean;
removeComments: boolean;
removeDefaultTypeAttributes: boolean;
};
comprehensive: {
collapseAttributeWhitespace: boolean;
collapseBooleanAttributes: boolean;
collapseEmptyAttributes: boolean;
collapseWhitespace: boolean;
decodeEntities: boolean;
mergeScripts: boolean;
mergeStyles: boolean;
minifyCSS: boolean;
minifyJS: boolean;
minifyJSON: boolean;
minifySVG: boolean;
minifyURLs: boolean;
removeAttributeQuotes: boolean;
removeComments: boolean;
removeDefaultTypeAttributes: boolean;
removeEmptyAttributes: boolean;
removeOptionalTags: boolean;
removeRedundantAttributes: boolean;
selfCloseForeignElements: boolean;
useShortDoctype: boolean;
};
};
/**
* @param {string} name - Preset name (“conservative” or “comprehensive”)
* @returns {object|null} Preset options object or null if not found
*/
export declare function getPreset(name: string): object | null;
/**
* @returns {string[]} Array of preset names
*/
export declare function getPresetNames(): string[];
//# sourceMappingURL=presets.d.ts.map