Skip to content

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

Feidhm: applyMinify()

applyMinify(css, options?): string

Béite

Cuir tiontuithe mionaithe airíonna saincheaptha i bhfeidhm ar shreang stíle.

Tógann sé eagar breiseán PostCSS ó options agus ritheann sé é go sioncrónach. Ord na mbriseán: pruneCustomPropsflattenPropertymangleCustomProps. Filleann sé an ionchur gan athrú nuair nach bhfuil aon roghanna socraithe.

Paraiméadair

css

string

An sreang stíle le tiontú.

options?

PropsMinifyOptions = {}

PropsMinifyOptions.

Tuairisceáin

string

An sreang CSS tiontaithe.

Sampla

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