# @eui/tools 中文文档

规范地址：https://npmcn.com/package/%40eui/tools/

版本：6\.21\.135
npm 元数据更新时间：2026-04-10T09:29:32.115Z
中文译文更新时间：2026-11-14T00:23:29.518Z
软件包许可：EUPL-1\.1

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40eui/tools
原文对照：https://npmcn.com/package/%40eui/tools/?lang=original

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：9.6 MB，591 个文件
- 模块格式：CommonJS
- TypeScript 类型：未声明
- 运行依赖：37 个
- 首次发布：2019-09-11T06:51:51.837Z
- 最新版本发布：2026-04-10T09:29:31.978Z
- 近 30 天下载量：9257（2026-10-14 至 2026-11-12，npm 官方下载统计）
- 已发布版本数：1020（近 12 个月 4 个）

## 中文简介

eUI 常用工具和脚本

## 安装

```sh
npm install @eui/tools
```

也可以使用：`pnpm add @eui/tools`、`yarn add @eui/tools`、`bun add @eui/tools`

## README

# @ eui/ 工具

## 软件包

### 构建软件包

```sh
eui-scripts build-package <package-name>

# Build a package but **first** its dependencies
eui-scripts build-package <package-name> --deps

# Build a package and send report to Slack
eui-scripts build-package <package-name> --slackReport

# Customize Slack end-point and channel
eui-scripts build-package <package-name> --slackEndPoint /my-new-end-point --slackChannel #my-channel

```

### 构建软件包的依赖性

如果您有多个软件包, 如果您想要测试一个软件包, 您需要构建它的依赖性 。 这就是这个命令的目的(在测试软件包之前先运行).

```sh
eui-scripts build-deps <package-name>
```

### 测试包

```sh
eui-scripts test-package <package-name>

# or with watch
eui-scripts test-package <package-name> --watch
```

### 发布软件包

```sh
eui-scripts publish <package-name>

# to a specific registry
eui-scripts publish <package-name> --registry=http://my-new-registry.com

# to an alias declared in .euirc.json
eui-scripts publish <package-name> --<registry-alias>

# with Slack Repport
eui-scripts publish <package-name> --slackReport

# Custom Slack end-point & channel
eui-scripts publish <package-name> --slackEndPoint /my-new-end-point --slackChannel #my-channel
```

### 清洁包装

```sh
eui-scripts clean-package <package-name>
```

### 构建所有软件包

```sh
eui-scripts build-all
```

### 清除所有软件包

```sh
eui-scripts clean-all
```

### 发布所有软件包

```sh
eui-scripts publish-all

# to a specific registry
eui-scripts publish-all --registry=http://my-new-registry

# to an alias declared in .euirc.json
eui-scripts publish-all --<registry-alias>
```

## 应用容器

### 生成翻译

装入包"/assets/i18n/"文件夹中的翻译,并生成包含所有翻译的1个编译文件.

```sh
# You need to provide **scopes**
eui-scripts generate-translations --scopes=opsys,opsys-ui,cc

# Or you can pass packages directly
eui-scripts generate-translations --packages=@opsys-ui/something,@cc/something-else

# Languages (default: ["en", "fr"])
# You can specify the languages
eui-scripts generate-translations --scopes=opsys --langs=en,fr,es,de

# The "root" folder where 'node_modules" is relative to, is by default the process.cwd()
# You can override it passing a --target argument
eui-scripts generate-translations --scopes=opsys --target=src/main/angular

# The destination where the generate files will be saved is "src/assets/i18n-compiled"
# relative to the root folder. You can change it providing a --folder argument
# Be careful that this folder will be removed on each generation so make sure it does not contain
# any other files.
eui-scripts generate-translations --scopes=opsys --folder=src/assets/here-better
```

### 附属关系的摘录版本

在 _节点( 模块)_ 指定范围的文件夹.

```sh
# IMPORTANT:
# This script will replace this line:
# "export const VERSIONS = {}"
# in a "src/config/index.ts" file relative to the root.
# You then need to have this file in your project with the specified line of code.

eui-scripts extract-deps-versions --scopes=opsys,opsys-ui,eui

# The "root" folder where the "index.ts" file is relative to, is by default the process.cwd()
# You can override it passing a --target argument
eui-scripts extract-deps-versions --scopes=opsys,eui --target=src/main/angular
```

## 常见问题

### @eui/tools 是什么？

eUI 常用工具和脚本

### 如何安装 @eui/tools？

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

### @eui/tools 支持 TypeScript 吗？

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

### @eui/tools 支持 ESM 还是 CommonJS？

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

### @eui/tools 可以商用吗？

@eui/tools 使用 EUPL-1\.1 许可。声明的许可为 EUPL-1\.1，请阅读许可原文确认使用条件。以上为概括，不构成法律意见，请以许可原文为准。

### @eui/tools 的下载量有多少？

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

### @eui/tools 还在维护吗？

最新版本 6\.21\.135 发布于 2026/04/10（7 个月前）；至今共发布 1020 个版本，其中过去 12 个月发布了 4 个；首次发布于 2019/09/11。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

