Skip to content

pantoken-root / plugins/postcss/props-minify/src / applyMinify

Swyddogaeth: applyMinify() ​

applyMinify(css, options?): string

Bêta

Cymhwyso trawsnewidiadau meintioli ar briodweddau wedi'u haddasu i linyn stylesheet.

Adeilada arae o ategion PostCSS o options a'i redeg yn sinkronig. Trefn yr ategion: pruneCustomProps → flattenProperty → mangleCustomProps. Dychwelyd y mewnbwn heb ei newid pan nad oes opsiynau wedi'u gosod.

Paramedrau ​

css ​

string

Y linyn stylesheet i'w drawsnewid.

options? ​

PropsMinifyOptions = {}

PropsMinifyOptions.

Yn dychwelyd ​

string

Y linyn CSS wedi'i drawsnewid.

Enghraifft ​

ts
import { applyMinify } from "@pantoken/plugin-props-minify";
const out = applyMinify(css, { prune: true, flatten: true, mangle: true });