Skip to content

pantoken CLI ​

@pantoken/cli տալիս է pantoken generate <target>, որը գրում է token աղբյուրը նպատակային պահեստանոցում: Օգտագործել այն, երբ պլատֆորմին անհրաժեշտ է գեներացված կոդ, ոչ թե runtime-կախվածություն — տեղական հավելվածներ, CMS թեմաներ և ստատիկ կայքերի գեներատորներ։

sh
npx pantoken generate <target> --out <dir> [--theme <name>] [--icons a,b,c]

For a project configured with shadcn, this delegates to shadcn add @pantoken/<item> and registers the indexed namespace when necessary:

sh
npx pantoken add button

Use the official shadcn list, search, and view commands for discovery. Registry items install Pantoken CSS styles and metadata, not React components.

Նպատակներ ​

TargetOutput
swiftSwift աղբյուր Sources/<name> տակ և Package.swift SwiftPM manifest նմուշ։
androidAndroid XML ռեսուրս ֆայլեր։
composeJetpack Compose Kotlin ֆայլ։
flutterFlutter Dart ֆայլ։
rusttokens.rs՝ egui-ի համար (առաջնային) կամ iced (--format iced)։
wordpressԲլոկ-թեմայի theme.json։
vanillaVanilla Forums variables.json։
drupalDrupal թեմայի նյութեր։
jekyllJekyll կայքի տվյալներ։
hugoHugo կայքի տվյալներ։
swatchesԳույնի նմուշներ — ase (առաջնային), gpl, sketch, կամ svg միջոցով --format։
icon-fontՆկարի վեբ-ֆոնը (TTF, WOFF2), դրա CSS և codepoints քարտեզ։
pendoInstructure-շարքի global.css՝ Pendo ուղեցույցների համար։

Ընդհանուր դրոշներ ​

  • --out <dir> — որտեղ գրել (նախորոշված ./pantoken-out)։
  • --theme <name> — rebrand (նախորոշված), canvas, կամ canvasHighContrast։
  • --icons a,b,c — իկոնների անուններ, որոնք պետք է արտահանվեն որպես տեղական ռեսուրսներ՝ նպատակների համար, որոնք աջակցության են տալիս դրանց։
  • --class <Name> — գեներացված տիպի կամ փաթեթի անունը, նպատակների համար, որոնք դրա կարիքն ունեն։
  • --format <fmt> — ելքի ֆորմատը, swatches և rust համար։

Օրինակներ ​

sh
# iOS tokens plus two icons, in the Canvas theme.
npx pantoken generate swift --out ./ios/Tokens --theme canvas --icons arrow-left,check-mark

# A WordPress block theme's theme.json.
npx pantoken generate wordpress --out ./wp-content/themes/mytheme

# An egui palette for a Rust app.
npx pantoken generate rust --out ./src/tokens.rs --format egui

Մինչև մի քանիսն նպատաբեր նաև բաց են պատկերացումային ֆունկցիայի համար, որպեսզի կարողանաք կանչել դրանք ձեր սեփական build-ից CLI փոխարեն։ Տես API reference յուրաքանչյուր պլատֆորմ փաթեթի համար։