# 05test 中文文档

规范地址：https://npmcn.com/package/05test/

版本：1\.0\.1
npm 元数据更新时间：2022-04-04T10:07:57.392Z
中文译文更新时间：2026-10-31T11:24:35.132Z
软件包许可：ISC

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

原始 npm 页面：https://www.npmjs.com/package/05test
原文对照：https://npmcn.com/package/05test/?lang=original

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

- 包体积（解压后）：6.3 kB，3 个文件
- 模块格式：CommonJS
- TypeScript 类型：未声明
- 运行依赖：0 个
- 首次发布：2018-08-01T20:03:47.437Z
- 最新版本发布：2018-08-01T21:53:36.067Z
- 已发布版本数：2（近 12 个月 0 个）

## 中文简介

视频的演示包

## 安装

```sh
npm install 05test
```

也可以使用：`pnpm add 05test`、`yarn add 05test`、`bun add 05test`

## README

## 角CLI

### 的Angular应用 [ember-cli](http://www.ember-cli.com/) 项目。

## 注意

如果你想合作，请退出 [我们的问题列表](https://github.com/angular/angular-cli/issues).

## 先决条件

CLI和生成的项目都有需要Node 6.9.0或更高版本的依赖项 NPM为3或以上。

## 目录表

-   [安装](https://npmcn.com/package/05test/#readme-installation)
-   [使用](https://npmcn.com/package/05test/#readme-usage)
-   [生成一个新项目](https://npmcn.com/package/05test/#readme-generating-and-serving-an-angular-project-via-a-development-server)
-   [生成组件、指令、管道和服务](https://npmcn.com/package/05test/#readme-generating-components-directives-pipes-and-services)
-   [更新Angular CLI](https://npmcn.com/package/05test/#readme-updating-angular-cli)
-   [Angular CLI的开发提示](https://npmcn.com/package/05test/#readme-development-hints-for-working-on-angular-cli)
-   [文档](https://npmcn.com/package/05test/#readme-documentation)
-   [许可证](https://npmcn.com/package/05test/#readme-license)

## 安装

**安装前：** 请阅读 [先决条件](https://npmcn.com/package/05test/#readme-prerequisites)

```bash
npm install -g @angular/cli
```

## 使用

```bash
ng help
```

### 通过开发服务器生成和服务Angular项目

```bash
ng new PROJECT-NAME
cd PROJECT-NAME
ng serve
```

导航到 `http://localhost:4200/`。如果你更改了任何源文件，应用程序将自动重新加载。

您可以使用两个命令行选项配置开发服务器使用的默认HTTP主机和端口：

```bash
ng serve --host 0.0.0.0 --port 4201
```

### 生成组件、指令、管道和服务

你可以使用 `ng generate` (或只是 `ng g`)命令来生成Angular组件：

```bash
ng generate component my-new-component
ng g component my-new-component # using the alias

# components support relative path generation
# if in the directory src/app/feature/ and you run
ng g component new-cmp
# your component will be generated in src/app/feature/new-cmp
# but if you were to run
ng g component ./newer-cmp
# your component will be generated in src/app/newer-cmp
# if in the directory src/app you can also run
ng g component feature/new-cmp
# and your component will be generated in src/app/feature/new-cmp
```

您可以在下表中找到所有可能的蓝图：

| 脚手架 | 使用 |
| --- | --- |

Angular-cli会添加引用到 `components`， `directives` 和 `pipes` 自动地 `app.module.ts`． 如果您需要将这些引用添加到另一个自定义模块，请遵循以下步骤：

1.  `ng g module new-module` 创建一个新模块
2.  呼叫 `ng g component new-module/new-component`

这应该添加新的 `component`， `directive` 或者 `pipe` 参考 `new-module` 您已经创建了。

### 更新Angular CLI

如果你使用的是Angular CLI `1.0.0-beta.28` 或者更少，您需要卸载 `angular-cli` 包中。由于更改了包的名称和作用域，所以应该这样做 `angular-cli` 来 `@angular/cli`：

```bash
npm uninstall -g angular-cli
npm uninstall --save-dev angular-cli
```

要将Angular CLI更新到新版本，你必须同时更新全局包和项目的本地包。

全球计划:

```bash
npm uninstall -g @angular/cli
npm cache verify
# if npm version is < 5 then use `npm cache clean`
npm install -g @angular/cli@latest
```

本地项目包：

```bash
rm -rf node_modules dist # use rmdir /S/Q node_modules dist in Windows Command Prompt; use rm -r -fo node_modules,dist in Windows PowerShell
npm install --save-dev @angular/cli@latest
npm install
```

如果您正在从beta或RC版本更新到1.0，请查看我们的 [1.0更新指南](https://github.com/angular/angular-cli/wiki/stories-1.0-update).

您可以在中找到有关版本之间更改的更多详细信息 [GitHub上的发布选项卡](https://github.com/angular/angular-cli/releases).

## Angular CLI的开发提示

### 与师傅一起工作

```bash
git clone https://github.com/angular/angular-cli.git
cd angular-cli
npm link
```

`npm link` 非常相似 `npm install -g` 除了不下载包 从回购，刚刚克隆 `angular-cli/` 文件夹成为全局包。 此外，这个存储库发布了几个包，我们使用特殊的逻辑来加载它们 关于开发设置。

中的文件的任何更改 `angular-cli/` 文件夹将立即影响全局 `@angular/cli` 包, 允许您快速测试对cli项目所做的任何更改。

现在你可以用 `@angular/cli` 通过命令行：

```bash
ng new foo
cd foo
npm link @angular/cli
ng serve
```

`npm link @angular/cli` ，因为默认情况下全局安装 `@angular/cli` 只加载 当地的 `@angular/cli` 从从npm远程获取的项目中。 `npm link @angular/cli` 符号链接全局 `@angular/cli` 包裹到本地 `@angular/cli` 包中。 现在, `angular-cli` 你之前克隆的是在三个地方 你克隆到的文件夹，npm的文件夹，存放全局包和你刚刚创建的Angular CLI项目。

你也可以用 `ng new foo --link-cli` 自动链接 `@angular/cli` 包中。

请阅读官方 [npm-link文档](https://docs.npmjs.com/cli/link) 和 [npm-link备忘单](http://browsenpm.org/help#linkinganynpmpackagelocally) 了解更多信息。

要运行Angular CLI测试套件，请使用 `node tests/run_e2e.js` 命令。 它还可以接收一个文件名，以便只运行该测试(例如： `node tests/run_e2e.js tests/e2e/tests/build/dev-build.ts`）。

作为测试过程的一部分，将构建并链接所有包。 您需要重新运行 `npm link` 以便在测试结束后重新链接Angular CLI开发环境。

## 文档

Angular CLI的文档就在这个repo中 [维基](https://github.com/angular/angular-cli/wiki).

## 许可证

麻省理工学院

## 常见问题

### 05test 是什么？

视频的演示包

### 如何安装 05test？

在项目目录运行 npm install 05test，或使用 pnpm add / yarn add / bun add。

### 05test 支持 TypeScript 吗？

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

### 05test 支持 ESM 还是 CommonJS？

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

### 05test 可以商用吗？

05test 使用 ISC 许可。宽松许可：允许商业使用、修改和再分发，通常只需在分发时保留原版权与许可声明。以上为概括，不构成法律意见，请以许可原文为准。

### 05test 还在维护吗？

最新版本 1\.0\.1 发布于 2018/08/02（8 年前）；至今共发布 2 个版本，其中过去 12 个月发布了 0 个；首次发布于 2018/08/02。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

