@chassis-ui/assets

中文文档
0.12.0发布于 2026/11/04MITES Module零依赖构建来源已验证近 30 天下载 1807

A multi-brand, multi-product asset management system for distributing fonts, images, icons, and other design files across web, iOS, and Android platforms.

原始使用文档

@chassis-ui/assets

The build of the Chassis Design System's assets: fonts, images, icons and other design files, copied from source/<brand>/<app>/<type>/ of a repository of assets to dist/<platform>/<app>/<brand>/ with the names and the formats of the web, iOS and Android. The build is file-driven: a designer adds a file, and the build does the rest. It needs Node.js 22.12 or later and nothing else.

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

npx @chassis-ui/assets init acme-assets --brand acme --app site:web mobile:ios,android
cd acme-assets
git init && git lfs install
npm install
npm run build
CommandWhat it does
chassis-assets buildEvery brand, app and platform of chassis.build in package.json
chassis-assets analyzeSizes, types and duplicates of the source and the output
chassis-assets validateChecks an existing output against the source and the configuration
chassis-assets contractChecks an output against the consumer contracts of chassis.checks.json
chassis-assets verifyThe validator, then the contract check
chassis-assets lfsThe Git LFS paths a build reads, for git lfs pull --include
chassis-assets archiveOne zip per platform, app and brand of an existing output, for a release
chassis-assets manifestThe files of an existing output with their sizes and hashes, for a release
chassis-assets diffThe files added, removed, renamed and changed since a manifest
chassis-assets release-notesPrints the changelog entry of a version, and fails without one
chassis-assets check-nativeCompiles an existing output with the tools of Xcode and of Android
chassis-assets init [dir]Writes the baseline of a repository of assets: package.json, the LFS attributes, the workflows
chassis-assets static-fontWrites the static font of a variable font at a weight, such as wght=600, to each output
chassis-assets lint-sourceChecks the names and the layout of source/

Every command takes --help, and --cwd <dir> names the repository root, by default the nearest folder upward whose package.json has a chassis block. The options that convert files load a package when they are given, an optional peer dependency: sharp and svgo for --optimize, --webp and --avif, subset-font for --subset and static-font, and svg2vectordrawable for --vector-drawables.

The documentation describes the source layout, the configuration, the output of each platform and how to use it in a project. The source of the build and its tests are in the repository.

版本与发布记录

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

版本发布日期距今
0.12.0latest2026/11/046 天前
0.11.12026/11/037 天前
0.11.02026/11/037 天前
0.10.02026/11/027 天前
0.9.02026/11/027 天前
0.8.02026/11/018 天前

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

@chassis-ui/assets 是什么?

A multi-brand, multi-product asset management system for distributing fonts, images, icons, and other design files across web, iOS, and Android platforms.

如何安装 @chassis-ui/assets?

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

@chassis-ui/assets 支持 TypeScript 吗?

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

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

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

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

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

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

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

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

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

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

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