Skip to main content

Module minify

Module minify 

Source
Expand description

Port of src/ast/minify.ts.

Selector parts are strings (Vec<String> per selector), lengths are utf-16 lengths like the javascript strings. The typescript minification context ({ [key]: any }) is MinifyContext; the render size cache stored on the options (options.cache) lives in the context: both belong to one minify() call.

Structs§

MatchedSelector
matched selectors (MatchedSelector)
MinifyContext
state of a minification (context)
MinifyOptions
options of a minification: the parser options and the registered features (MinifyFeatureOptions)

Functions§

minify
apply the minification rules to the ast tree
minify_with
minify with registered features and a context
optimize_selector
optimize a selector
split_rule
split a selector string into selectors of parts