Skip to content

pantoken / 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ı: pruneCustomPropsflattenPropertymangleCustomProps. 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 });