@diez/targets

中文文档
10.6.0发布于 2020/05/21SEE LICENSE.mdTypeScriptCommonJS近 30 天下载 1.3万

Diez compiler targets for various platforms.

原始使用文档

@diez/targets

This package contains reference compiler implementations for iOS, Web, and Android, and registers associated targets for ios, android, and web with diez compile --target <target>.

Contributing

This package uses the golden test pattern for end to end tests, checking that the compilers provided produce identical output to what is expected.

If you are contributing to @diez/targets and intentionally changed the expected output of golden tests, you can regenerate the canonical outputs that are used to pass the tests by running yarn regenerate-goldens. Whenever you do this, please carefully inspect the resulting diff to be sure it's both what you expected and correct.

Setup

The goldens tests depend on XcodeGen to generate Xcode projects from a yml project spec. Run brew install xcodegen to install XcodeGen.

版本与发布记录

@diez/targets 共发布 48 个版本,首次发布于 2019/04/25;过去 12 个月发布了 0 个版本。

版本发布日期距今
10.6.0latest2020/05/216 年前
10.6.0-beta.12020/05/216 年前
10.6.0-beta.02020/05/206 年前
10.5.22020/04/236 年前
10.5.02020/04/046 年前
10.5.0-beta.62020/04/046 年前

其他发布通道:10.2.0-beta.0 → 10.2.0-beta.0,10.2.0-beta.1 → 10.2.0-beta.1,10.2.0-beta.2 → 10.2.0-beta.2,10.3.0-beta.0 → 10.3.0-beta.0,10.4.0-beta.0 → 10.4.0-beta.0,10.4.0-beta.1 → 10.4.0-beta.1。

关于 @diez/targets 的常见问题

@diez/targets 是什么?

Diez compiler targets for various platforms.

如何安装 @diez/targets?

在项目目录运行 npm install @diez/targets,或使用 pnpm add / yarn add / bun add。

@diez/targets 支持 TypeScript 吗?

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

@diez/targets 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@diez/targets 可以商用吗?

@diez/targets 使用 SEE LICENSE.md 许可。声明的许可为 SEE LICENSE.md,请阅读许可原文确认使用条件。以上为概括,不构成法律意见,请以许可原文为准。

@diez/targets 的下载量有多少?

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

@diez/targets 还在维护吗?

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