Skip to content

pantoken / platforms/swift/src / generateSwift

Fonction: generateSwift()

generateSwift(options): Promise<string>

Expérimental

Générer du Swift pour un thème nommé (en utilisant l'IR @pantoken/tokens fourni).

Paramètres

options

GenerateSwiftOptions

Retourne

Promise<string>

Le chemin du fichier Swift écrit.

Exemple

ts
import { generateSwift } from "@pantoken/swift";

const file = await generateSwift({
  outDir: "./Sources/Tokens",
  theme: "rebrand",
  className: "PanTokens",
  icons: ["add", "check"], // optional: also emit an Icons.xcassets catalog
});