Skip to content

pantoken / deprecations

deprecations

Beta

@pantoken/plugin-deprecations — ngā āwhina hototahi e mātakitaki ana i te oranga mō ngā token kua whakakorea e te upstream.

Ina ka whakakorehia e tētahi putanga upstream tētahi token --instui-*, ka tuhi tētahi DeprecationLedger ā-ringa tōna oranga: i te wā i whakamāharatia, te tau minor upstream ka tango i taua token, me pēhea te whakamana i tōna mahi i taua wā — mā te whakamārohirohi ki tētahi token kōnei (replacementvar(...)) rānei mā te whakamātautau i tōna tohu whakamutunga (value). Ko tēnei pūrere tāpiri i tētahi token shim kotahi mō ia rēhitatanga. Nā te mea he kotahi noa te shim he var(...), he uara noa rānei, ka tuhi defineToken tōna refersTo/wetereo, ā, ka tukuna e toCss, nō reira ka uru te shim ki css/scss/less/stylus/wordpress/vanilla me te kore taura atu.

Kei ērā atu wāhi te whakatinanatanga o te reti — ka pakaru te tukanga whakahou (upgrade pipeline) ina tae ki te minor upstream kua mōhiotia mō te rēhitatanga, ā, ka aukati kia retihia te rēhitatanga me te waihanga i tētahi putanga minor mō te kaihoko. Ko dueForRemoval te tirohanga e tautoko ana i tēnei; ko describeLifecycle te mea e whakamārama ana i ngā tuhinga.

Tauira

ts
import { buildTokens } from "@pantoken/core/build";
import { deprecationShims } from "@pantoken/plugin-deprecations";
import ledger from "@pantoken/tokens/deprecations.json" with { type: "json" };

buildTokens({ theme: "rebrand", plugins: [deprecationShims(ledger)] });

Ngā Atanga

Ngā Mahi

Ngā Tohutoro

default

Ingoa-ana kia rere anō, me te kawe anō i te deprecationShims