Skip to content

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

Fonksiyon: applyMinify() ​

applyMinify(css, options?): string

Beta

Bir stil sayfası dizesine özel-değişken küçültme dönüşümleri uygular.

options'dan bir PostCSS eklenti dizisi oluşturur ve bunu eşzamanlı olarak çalıştırır. Eklenti sırası: pruneCustomProps → flattenProperty → mangleCustomProps. Hiçbir seçenek ayarlanmadığında girdiyi değişmeden geri döndürür.

Parametreler ​

css ​

string

Dönüştürülecek stil sayfası dizesi.

options? ​

PropsMinifyOptions = {}

PropsMinifyOptions.

Döndürür ​

string

Dönüştürülmüş CSS dizesi.

Örnek ​

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