Skip to content

pantoken-root / packages/cli/src / run

Fonksyon: run() ​

run(argv): Promise<void>

Beta

Kouri CLI a.

Paramèt ​

argv ​

readonly string[]

Retounen ​

Promise<void>

Egzanp ​

Ajoute yon konpozan soti nan rejis pantoken

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

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

Kreye yon pwojè demaraj React

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

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

Jenere tokens Swift nan yon repo konsomatè

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

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

Jenere yon palèt swatch tematik nan yon fòma espesifik

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

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