Skip to content

pantoken / platforms/swift/src / generateSwift

Funció: generateSwift()

generateSwift(options): Promise<string>

Experimental

Emetre Swift per a un tema anomenat (utilitzant el @pantoken/tokens IR venut).

Paràmetres

options

GenerateSwiftOptions

Retorna

Promise<string>

El camí del fitxer Swift escrit.

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
});