Skip to content

pantoken-root / platforms/swift/src / generateSwift

関数: generateSwift() ​

generateSwift(options): Promise<string>

実験的

ベンダー提供の @pantoken/tokens IR を使用して、名前付きテーマ向けの Swift を出力します。

パラメーター ​

options ​

GenerateSwiftOptions

戻り値 ​

Promise<string>

書き出された Swift ファイルのパス。

例 ​

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