Skip to content

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

Mahi: applyMinify() ​

applyMinify(css, options?): string

Beta

Whakamahia ngā whakarerekētanga whakaiti mō ngā custom-property ki runga i tētahi rārangi stylesheet.

Hangaia he rārangi mono PostCSS nō options ka whakahaerehia kia rite tonu. Te raupapa mono: pruneCustomProps → flattenProperty → mangleCustomProps. Ka whakahoki i te urunga kia kore e huri mēnā kāore he kōwhiringa kua tautuhia.

Ngā Tawhā ​

css ​

string

Te rārangi stylesheet hei huri.

options? ​

PropsMinifyOptions = {}

PropsMinifyOptions.

Whakahokia ​

string

Te rārangi CSS kua hurihia.

Tauira ​

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