svgo
Version:
60 lines (59 loc) • 2.19 kB
TypeScript
export type Usage = {
force?: boolean | undefined;
ids?: boolean | undefined;
classes?: boolean | undefined;
tags?: boolean | undefined;
};
export type MinifyStylesParams = {
/**
* Disable or enable a structure optimizations.
*/
restructure?: boolean | undefined;
/**
* Enables merging of `@media` rules with the same media query split by other
* rules. Unsafe in general, but should work fine in most cases. Use it on
* your own risk.
*/
forceMediaMerge?: boolean | undefined;
/**
* Specify what comments to leave:
* - `'exclamation'` or `true` — leave all exclamation comments
* - `'first-exclamation'` — remove every comment except first one
* - `false` — remove all comments
*/
comments?: ('exclamation' | 'first-exclamation' | boolean) | undefined;
/**
* Advanced optimizations.
*/
usage?: (boolean | Usage) | undefined;
};
/**
* @typedef Usage
* @property {boolean=} force
* @property {boolean=} ids
* @property {boolean=} classes
* @property {boolean=} tags
*
* @typedef MinifyStylesParams
* @property {boolean=} restructure Disable or enable a structure optimizations.
* @property {boolean=} forceMediaMerge
* Enables merging of `@media` rules with the same media query split by other
* rules. Unsafe in general, but should work fine in most cases. Use it on
* your own risk.
* @property {'exclamation' | 'first-exclamation' | boolean=} comments
* Specify what comments to leave:
* - `'exclamation'` or `true` — leave all exclamation comments
* - `'first-exclamation'` — remove every comment except first one
* - `false` — remove all comments
* @property {boolean | Usage=} usage Advanced optimizations.
*/
export declare const name = "minifyStyles";
export declare const description = "minifies styles and removes unused styles";
/**
* Minifies styles (<style> element + style attribute) using CSSO.
*
* @author strarsis <strarsis@gmail.com>
* @type {import('../lib/types.js').Plugin<MinifyStylesParams>}
* @since 0.6.0
*/
export declare const fn: import('../lib/types.js').Plugin<MinifyStylesParams>;