Skip to content

pantoken-root / platforms/swift/src / generateSwift

Fonksiyon: generateSwift() ​

generateSwift(options): Promise<string>

Deneysel

Adlandırılmış bir tema için Swift çıkar (pakete dahil edilmiş @pantoken/tokens IR'sini kullanarak).

Parametreler ​

options ​

GenerateSwiftOptions

Döndürür ​

Promise<string>

Yazılan Swift dosyasının yolu.

Örnek ​

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