Skip to content

pantoken-root / packages/plugin-kit/src / mergePlugin

Fonksyon: mergePlugin() ​

mergePlugin(...plugins): PantokenPlugin

Beta

Konbine plizyè plugin an yon sèl, pa pliye yo soti agoch pou rive adwat ak extendPlugin.

Paramèt ​

plugins ​

...PantokenPlugin[]

Plugin yo pou konbine (omwen youn).

Retounen ​

PantokenPlugin

Yon sèl plugin ki gen mak.

Egzanp ​

Konbine plugin parèy yo an yon sèl

ts
import { capabilitiesOf, definePlugin, mergePlugin } from "@pantoken/plugin-kit";

const brand = definePlugin({ name: "brand", tokens: (c) => c.tokens });
const glyphs = definePlugin({ name: "glyphs", icons: () => [{ name: "star" }] });

const combined = mergePlugin(brand, glyphs);
capabilitiesOf(combined); // → ["tokens", "icons"]