@chassis-ui/tokens

中文文档
0.16.0发布于 2026/11/04MITES Module构建来源已验证近 30 天下载 2442

The builder of design tokens for the Chassis Design System: the chassis-tokens command, which builds a repository of Tokens Studio files into SCSS, Swift, SwiftUI, Android resources and Jetpack Compose

原始使用文档
文档目录3 节
  1. Your own tokens
  2. Changes
  3. License

@chassis-ui/tokens

The builder of design tokens of the Chassis Design System: the chassis-tokens command builds a repository of Tokens Studio tokens with Style Dictionary into SCSS for the web, Swift and SwiftUI for iOS, and resources and Jetpack Compose for Android. The package holds the Chassis token system, which chassis-tokens init writes into a new repository of tokens.

Your own tokens

Write a repository of tokens, with this package as a development dependency:

npx @chassis-ui/tokens init acme-tokens --brand acme --app site:web mobile:ios,android
cd acme-tokens
git init
npm install
npm run build

That writes a package.json with the build configuration, the token sets of the Chassis token system, a README and the workflows of CI and of a release. The token sets are the repository's from then on: no later version of this package writes over them. chassis-tokens --help lists the commands: build, verify, diff, lint-source, swift-package, archive, release-notes and init. See the documentation.

Changes

CHANGELOG.md lists every release and what each breaking change asks of an app.

License

MIT

版本与发布记录

@chassis-ui/tokens 共发布 25 个版本,首次发布于 2025/10/27;过去 12 个月发布了 24 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.16.0latest2026/11/045 天前
0.15.02026/11/027 天前
0.14.02026/11/017 天前
0.13.02026/10/319 天前
0.12.02026/10/319 天前
0.11.02026/10/3010 天前

其他发布通道:alpha → 0.5.0-0,beta → 0.5.1-1,next → 0.8.0-next.1。

关于 @chassis-ui/tokens 的常见问题

@chassis-ui/tokens 是什么?

The builder of design tokens for the Chassis Design System: the chassis-tokens command, which builds a repository of Tokens Studio files into SCSS, Swift, SwiftUI, Android resources and Jetpack Compose

如何安装 @chassis-ui/tokens?

在项目目录运行 npm install @chassis-ui/tokens,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 chassis-tokens,可以用 npx chassis-tokens 直接运行。

@chassis-ui/tokens 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/chassis-ui__tokens 是否存在。

@chassis-ui/tokens 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@chassis-ui/tokens 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22.12.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@chassis-ui/tokens 可以商用吗?

@chassis-ui/tokens 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@chassis-ui/tokens 的下载量有多少?

根据 npm 官方下载统计,@chassis-ui/tokens 在 2026/10/10 – 2026/11/08 这 30 天内被下载 2,442 次,日均约 81 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@chassis-ui/tokens 还在维护吗?

最新版本 0.16.0 发布于 2026/11/04(5 天前);至今共发布 25 个版本,其中过去 12 个月发布了 24 个;首次发布于 2025/10/27。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。