@haiilo/catalyst-tokens

中文文档
14.16.0发布于 2026/11/10MITTypeScriptES Module构建来源已验证近 30 天下载 5821

Design tokens for Catalyst Design System

原始使用文档
文档目录6 节
  1. Getting started
  2. Contributing
  3. Package management
  4. Build
  5. Publishing
  6. License

Catalyst: Tokens

Tokens: build & test

This project contains all design tokens for the Catalyst design system.

Tokens are being transformed using Amazon Style Dictionary.

Style Dictionary is a build system that allows you to define styles once, in a way for any platform or language to consume. A single place to create and edit your styles, and a single command exports these rules to all the places you need them - iOS, Android, CSS, JS, HTML, sketch files, style documentation, or anything you can think of. It is available as a CLI through npm, but can also be used like any normal node module if you want to extend its functionality.

Getting started

Install @haiilo/catalyst-tokens in your Node.js powered apps with the npm package:

npm install @haiilo/catalyst-tokens

Contributing

If you want to add or update tokens in this repository, please make sure to adhere to the design token structure outlined at Design token structure.

Package management

This project is using npm as a package manager. This is especially important if you want to add new dependencies to a project and fail to provide an updated package-lock.json. This will cause the CI build to fail. If dependencies in the package lock do not match those in package.json, npm will exit with an error in the CI build, instead of updating the package lock.

Build

Run npm run build to build the project. The build artifacts will be stored in the dist directory. Artifacts will automatically be generated on the basis of the output configuration defined in config.js.

Publishing

The library can be published by running npm publish. However, the preferred way to publish a new version of the library is via the CI setup. A new version of the library will automatically be published to npm when pushing a new tag on the main branch. To simplify this process, you can use the following npm commands:

  • npm run release:major releases a new major version
  • npm run release:minor releases a new minor version
  • npm run release:patch releases a new patch version

These commands will automatically increase the version number in the package.json and package-lock.json, commit the changed files, create a corresponding git tag and push everything to the remote branch. This will then automatically publish a new library version.

License

The license is available within the main repository in the LICENSE file.

版本与发布记录

@haiilo/catalyst-tokens 共发布 270 个版本,首次发布于 2022/03/07;过去 12 个月发布了 31 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
14.16.0latest2026/11/106 天前
14.15.02026/11/0412 天前
14.14.02026/10/2127 天前
14.13.02026/08/212 个月前
14.12.02026/08/202 个月前
14.11.12026/08/073 个月前

其他发布通道:beta → 13.5.1-beta.1。

关于 @haiilo/catalyst-tokens 的常见问题

@haiilo/catalyst-tokens 是什么?

Design tokens for Catalyst Design System

如何安装 @haiilo/catalyst-tokens?

在项目目录运行 npm install @haiilo/catalyst-tokens,或使用 pnpm add / yarn add / bun add。

@haiilo/catalyst-tokens 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@haiilo/catalyst-tokens 支持 ESM 还是 CommonJS?

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

@haiilo/catalyst-tokens 可以商用吗?

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

@haiilo/catalyst-tokens 的下载量有多少?

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

@haiilo/catalyst-tokens 还在维护吗?

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