Skip to content

pantoken-root / packages/cli/src / run

Swyddogaeth: run() ​

run(argv): Promise<void>

Bêta

Rhedeg y CLI.

Paramedrau ​

argv ​

readonly string[]

Yn dychwelyd ​

Promise<void>

Enghreifftiau ​

Ychwanegu cydran o gofrestr pantoken

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

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

Creu dechrau React

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

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

Generadu tokenau Swift i mewn i repo defnyddiwr

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

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

Generadu palet sampl lliw wedi'i themeio mewn fformat penodol

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

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