Skip to content

pantoken-root / packages/cli/src / run

Mahi: run() ​

run(argv): Promise<void>

Beta

Whakahaerehia te CLI.

Ngā Tawhā ​

argv ​

readonly string[]

Whakahokia ​

Promise<void>

Ngā tauira ​

Tāpiri i tētahi waahanga mai i te rehitatanga pantoken

ts
import { run } from "@pantoken/cli";

await run(["add", "button"]);

Whakakī i tētahi tīmata React

ts
import { run } from "@pantoken/cli";

await run(["create", "react", "--dir", "./my-app", "--no-install"]);

Hangaia ngā tohu Swift ki roto i tētahi repo kaiwhakamahi

ts
import { run } from "@pantoken/cli";

// Writes Sources/PanTokens/Tokens.swift + Package.swift under ./ios/DesignTokens.
await run(["generate", "swift", "--out", "./ios/DesignTokens"]);

Hangaia he papatohu tauira tae āhua i roto i tētahi hōputu motuhake

ts
import { run } from "@pantoken/cli";

await run(["generate", "swatches", "--format", "gpl", "--theme", "canvas", "--out", "./out"]);