pantoken / platforms/swift/src / generateSwift
Function: generateSwift()
generateSwift(
options):Promise<string>
Experimental
Emit Swift for a named theme (using the vendored @pantoken/tokens IR).
Parameters
options
Returns
Promise<string>
The path of the written Swift file.
Example
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
});