Skip to content

pantoken / platforms/swift/src / generateSwift

Swyddogaeth: generateSwift()

generateSwift(options): Promise<string>

Arbrofol

Cynhyrchu Swift ar gyfer thema wedi'i enwi (gan ddefnyddio'r IR @pantoken/tokens a ddarparwyd).

Paramedrau

options

GenerateSwiftOptions

Yn dychwelyd

Promise<string>

Llwybr y ffeil Swift a ysgrifennwyd.

Enghraifft

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