2017-05-26 15:28:06 -04:00
|
|
|
|
# Anatomy of the Setup Project
|
2017-03-31 19:57:13 -04:00
|
|
|
|
|
2017-07-29 12:03:22 -04:00
|
|
|
|
# 搭建项目环境
|
2017-03-31 19:57:13 -04:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
The documentation [setup](guide/setup) procedures install a _lot_ of files.
|
|
|
|
|
Most of them can be safely ignored.
|
|
|
|
|
|
2017-07-22 23:51:25 -04:00
|
|
|
|
在[搭建](guide/setup)本地开发环境的过程中会安装*很多*文件。它们大部分都可以被忽略掉。
|
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
Application files _inside the_ **`src/`** and **`e2e/`** folders matter most to developers.
|
|
|
|
|
|
2017-07-22 23:51:25 -04:00
|
|
|
|
对程序员来讲最重要的是在 *`src/`* 和 *`e2e/`* 文件夹*之内*的应用文件。
|
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
Files _outside_ those folders condition the development environment.
|
|
|
|
|
They rarely change and you may never view or modify them.
|
|
|
|
|
If you do, this page can help you understand their purpose.
|
|
|
|
|
|
2017-07-22 23:51:25 -04:00
|
|
|
|
在这两个文件夹*之外*的文件为开发环境设定条件。
|
|
|
|
|
这些文件很少会需要变动,你可能永远都不需要阅览或者修改它们。
|
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
<style>
|
2018-03-03 08:06:01 -05:00
|
|
|
|
td, th {vertical-align: top}
|
|
|
|
|
</style>
|
2017-03-30 15:04:18 -04:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
<table width="100%">
|
|
|
|
|
|
|
|
|
|
<col width="10%">
|
|
|
|
|
|
|
|
|
|
</col>
|
|
|
|
|
|
|
|
|
|
<col width="90%">
|
|
|
|
|
|
|
|
|
|
</col>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
|
|
<th>
|
2017-07-22 23:51:25 -04:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
File
|
2017-07-22 23:51:25 -04:00
|
|
|
|
|
|
|
|
|
文件
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</th>
|
|
|
|
|
|
|
|
|
|
<th>
|
2017-07-22 23:51:25 -04:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
Purpose
|
2017-07-22 23:51:25 -04:00
|
|
|
|
|
|
|
|
|
用途
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</th>
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
|
|
<td>
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
<code>src/app/</code>
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td>
|
2017-03-31 19:57:13 -04:00
|
|
|
|
|
2018-03-03 08:06:01 -05:00
|
|
|
|
Angular application files go here.
|
2017-07-22 23:51:25 -04:00
|
|
|
|
|
|
|
|
|
你的 Angular 应用文件。
|
2017-03-31 19:57:13 -04:00
|
|
|
|
|
|
|
|
|
Ships with the "Hello Angular" sample's
|
|
|
|
|
`AppComponent`, `AppModule`, a component unit test (`app.component.spec.ts`), and
|
|
|
|
|
the bootstrap file, `main.ts`.
|
|
|
|
|
|
2017-07-22 23:51:25 -04:00
|
|
|
|
"Hello Angular" 这个例子中有 `AppComponent`、`AppModule`、 一个组件单元测试 (`app.component.spec.ts`) 以及引导文件 `main.ts`。
|
|
|
|
|
|
2018-03-06 22:25:56 -05:00
|
|
|
|
Try the <live-example name="setup">sample application</live-example>
|
2018-01-22 15:48:11 -05:00
|
|
|
|
and the <live-example name="setup" stackblitz="quickstart-specs">unit test</live-example>
|
2017-03-31 19:57:13 -04:00
|
|
|
|
as _live examples_.
|
2017-07-22 23:51:25 -04:00
|
|
|
|
|
2018-03-07 03:15:21 -05:00
|
|
|
|
在live example中试试<live-example name="setup">范例程序</live-example>和<live-example name="setup" stackblitz="quickstart-specs">单元测试</live-example>
|
2017-07-22 23:51:25 -04:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
|
|
<td>
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
<code>e2e/</code>
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td>
|
2017-03-31 19:57:13 -04:00
|
|
|
|
|
|
|
|
|
_End-to-end_ (e2e) tests of the application,
|
|
|
|
|
written in Jasmine and run by the
|
2017-04-24 14:23:45 -04:00
|
|
|
|
<a href="http://www.protractortest.org/" title="Protractor: end-to-end testing for Angular">protractor</a>
|
2017-03-31 19:57:13 -04:00
|
|
|
|
e2e test runner.
|
|
|
|
|
|
2017-07-22 23:51:25 -04:00
|
|
|
|
应用的*端对端*(e2e)测试,用 Jasmine 写成并用 <a href="http://www.protractortest.org/" target="_blank" title="Protractor:Angular 的端对端测试">protractor</a> 端对端测试运行器测试。
|
|
|
|
|
|
2017-03-31 19:57:13 -04:00
|
|
|
|
Initialized with an e2e test for the "Hello Angular" sample.
|
2017-07-22 23:51:25 -04:00
|
|
|
|
|
|
|
|
|
初始化后,有个“Hello Angular” 的例子的端对端测试。
|
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
|
|
<td>
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
<code>node_modules/</code>
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td>
|
2017-03-31 19:57:13 -04:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
The _npm_ packages installed with the `npm install` command.
|
2017-07-22 23:51:25 -04:00
|
|
|
|
|
|
|
|
|
用 `npm install` 命令安装的 *npm* 包。
|
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
|
|
<td>
|
2018-03-06 22:25:56 -05:00
|
|
|
|
|
2017-03-31 19:57:13 -04:00
|
|
|
|
<code>.editorconfig<br>
|
|
|
|
|
.git/<br>
|
|
|
|
|
.gitignore<br>
|
|
|
|
|
.travis.yml</code>
|
2018-03-06 22:25:56 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td>
|
2017-03-31 19:57:13 -04:00
|
|
|
|
|
2018-03-03 08:06:01 -05:00
|
|
|
|
Tooling configuration files and folders.
|
2018-03-06 22:25:56 -05:00
|
|
|
|
Ignore them until you have a compelling reason to do otherwise.
|
2017-07-22 23:51:25 -04:00
|
|
|
|
|
|
|
|
|
配置文件和文件夹的工具。
|
2018-03-06 22:25:56 -05:00
|
|
|
|
除非你有足够的理由,否则别动它。
|
2017-07-22 23:51:25 -04:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
|
|
<td>
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
<code>CHANGELOG.md</code>
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td>
|
2017-03-31 19:57:13 -04:00
|
|
|
|
|
|
|
|
|
The history of changes to the _QuickStart_ repository.
|
|
|
|
|
Delete or ignore.
|
2017-07-22 23:51:25 -04:00
|
|
|
|
|
2018-03-03 08:06:01 -05:00
|
|
|
|
*快速上手*库的更新历史。
|
2017-07-22 23:51:25 -04:00
|
|
|
|
删除或忽略。
|
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
|
|
<td>
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
<code>favicon.ico</code>
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td>
|
2017-03-31 19:57:13 -04:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
The application icon that appears in the browser tab.
|
2017-07-22 23:51:25 -04:00
|
|
|
|
|
|
|
|
|
出现在浏览器标签上的应用图标。
|
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
|
|
<td>
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
<code>index.html</code>
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td>
|
2017-03-31 19:57:13 -04:00
|
|
|
|
|
|
|
|
|
The application host page.
|
|
|
|
|
It loads a few essential scripts in a prescribed order.
|
|
|
|
|
Then it boots the application, placing the root `AppComponent`
|
|
|
|
|
in the custom `<my-app>` body tag.
|
|
|
|
|
|
2017-07-22 23:51:25 -04:00
|
|
|
|
应用的宿主页面。
|
|
|
|
|
它以特定的顺序加载一些基本脚本。
|
|
|
|
|
然后它启动应用,将根`AppComponent`放置到自定义`<my-app>`标签里。
|
|
|
|
|
|
2017-03-31 19:57:13 -04:00
|
|
|
|
The same `index.html` satisfies all documentation application samples.
|
2017-07-22 23:51:25 -04:00
|
|
|
|
|
|
|
|
|
同一个 `index.html`满足所有文档应用例子。
|
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
|
|
<td>
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
<code>karma.conf.js</code>
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td>
|
2017-03-31 19:57:13 -04:00
|
|
|
|
|
2017-04-24 14:23:45 -04:00
|
|
|
|
Configuration for the <a href="https://karma-runner.github.io/1.0/index.html" title="Karma unit test runner">karma</a>
|
2017-03-31 19:57:13 -04:00
|
|
|
|
test runner described in the [Testing](guide/testing) guide.
|
2017-07-22 23:51:25 -04:00
|
|
|
|
|
|
|
|
|
在[测试](guide/testing)指南中提到的 <a href="https://karma-runner.github.io/1.0/index.html" target="_blank" title="Karma测试运行器">karma</a> 测试运行器的配置。
|
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
|
|
<td>
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
<code>karma-test-shim.js</code>
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td>
|
2017-03-31 19:57:13 -04:00
|
|
|
|
|
2017-04-24 14:23:45 -04:00
|
|
|
|
Script to run <a href="https://karma-runner.github.io/1.0/index.html" title="Karma unit test runner">karma</a>
|
2017-03-31 19:57:13 -04:00
|
|
|
|
with SystemJS as described in the [Testing](guide/testing) guide.
|
2017-07-22 23:51:25 -04:00
|
|
|
|
|
|
|
|
|
在[测试](guide/testing)指南中提到的 <a href="https://karma-runner.github.io/1.0/index.html" target="_blank" title="Karma测试运行器">karma</a> 测试运行器的脚本。
|
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
|
|
<td>
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
<code>non-essential-files.txt</code>
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td>
|
2017-03-31 19:57:13 -04:00
|
|
|
|
|
|
|
|
|
A list of files that you can delete if you want to purge your setup of the
|
2017-07-07 19:55:17 -04:00
|
|
|
|
original QuickStart Seed testing and git maintenance artifacts.
|
2017-03-31 19:57:13 -04:00
|
|
|
|
See instructions in the optional
|
|
|
|
|
[_Deleting non-essential files_](guide/setup#non-essential "Setup: Deleting non-essential files") section.
|
|
|
|
|
*Do this only in the beginning to avoid accidentally deleting your own tests and git setup!*
|
2017-07-22 23:51:25 -04:00
|
|
|
|
|
2017-08-06 19:49:44 -04:00
|
|
|
|
这个列表中的文件在清理时可以删除,它是原始的“快速上手”种子工程中的测试和git维护文件。
|
2017-07-22 23:51:25 -04:00
|
|
|
|
步骤参见可选的[删除非必要文件](guide/setup#non-essential "Setup: Deleting non-essential files")部分。
|
|
|
|
|
*只在最初做这件事,以免不小心删除了你自己的测试文件和git配置!*
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
|
|
<td>
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
<code>LICENSE</code>
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td>
|
2017-03-31 19:57:13 -04:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
The open source MIT license to use this setup code in your application.
|
2017-07-22 23:51:25 -04:00
|
|
|
|
|
|
|
|
|
应用的搭建代码中用到的开源 MIT 许可证。
|
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
|
|
<td>
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
<code>package.json</code>
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td>
|
2017-03-31 19:57:13 -04:00
|
|
|
|
|
|
|
|
|
Identifies `npm `package dependencies for the project.
|
|
|
|
|
|
2017-07-22 23:51:25 -04:00
|
|
|
|
为项目指定`npm`依赖包。
|
|
|
|
|
|
2017-03-31 19:57:13 -04:00
|
|
|
|
Contains command scripts for running the application,
|
|
|
|
|
running tests, and more. Enter `npm run` for a listing.
|
|
|
|
|
<a href="https://github.com/angular/quickstart/blob/master/README.md#npm-scripts"
|
2017-04-24 14:23:45 -04:00
|
|
|
|
title="npm scripts for Angular documentation samples">Read more</a> about them.
|
2017-07-22 23:51:25 -04:00
|
|
|
|
|
|
|
|
|
包含了一些命令脚本,用来运行应用、运行测试与其他。输入`npm run`来查看命令列表。
|
|
|
|
|
到<a href="https://github.com/angular/quickstart/blob/master/README.md#npm-scripts"
|
|
|
|
|
target="_blank" title="Angular 文档例子的 npm 脚本">这里</a>阅读更多关于它们的说明。
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
|
|
<td>
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
<code>protractor.config.js</code>
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td>
|
2017-03-31 19:57:13 -04:00
|
|
|
|
|
|
|
|
|
Configuration for the
|
2017-04-24 14:23:45 -04:00
|
|
|
|
<a href="http://www.protractortest.org/" title="Protractor: end-to-end testing for Angular">protractor</a>
|
2017-03-31 19:57:13 -04:00
|
|
|
|
_end-to-end_ (e2e) test runner.
|
2017-07-22 23:51:25 -04:00
|
|
|
|
|
|
|
|
|
<a href="http://www.protractortest.org/" target="_blank" title="Protractor: Angular 的端对端测试">protractor</a> *端对端* (e2e) 测试器运行器的配置。
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
|
|
<td>
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
<code>README.md</code>
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td>
|
2017-03-31 19:57:13 -04:00
|
|
|
|
|
|
|
|
|
Instruction for using this git repository in your project.
|
|
|
|
|
Worth reading before deleting.
|
2017-07-22 23:51:25 -04:00
|
|
|
|
|
|
|
|
|
项目中使用这个 git 库的说明。
|
|
|
|
|
在删除前值得阅读。
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
|
|
<td>
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
<code>styles.css</code>
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td>
|
2017-03-31 19:57:13 -04:00
|
|
|
|
|
|
|
|
|
Global styles for the application. Initialized with an `<h1>` style for the QuickStart demo.
|
|
|
|
|
|
2017-08-06 19:49:44 -04:00
|
|
|
|
应用的全局样式。初始化后,有个为《快速上手》演示准备的`<h1>`样式。
|
2017-07-22 23:51:25 -04:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
|
|
<td>
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
<code>systemjs<br>.config.js</code>
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td>
|
2017-03-31 19:57:13 -04:00
|
|
|
|
|
|
|
|
|
Tells the **SystemJS** module loader where to find modules
|
|
|
|
|
referenced in JavaScript `import` statements. For example:
|
2017-07-22 23:51:25 -04:00
|
|
|
|
|
|
|
|
|
为 **SystemJS** 模块加载器指定去哪儿查找在 JavaScript 的`import`语句中引用的模块。例如:
|
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
<code-example language="ts">
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
import { Component } from '@angular/core;
|
2017-03-31 19:57:13 -04:00
|
|
|
|
|
2018-03-03 08:06:01 -05:00
|
|
|
|
</code-example>
|
2017-03-31 19:57:13 -04:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
Don't touch this file unless you are fully versed in SystemJS configuration.
|
2017-07-22 23:51:25 -04:00
|
|
|
|
|
|
|
|
|
除非你完全理解 SystemJS 的配置,不要修改它。
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
|
|
<td>
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
<code>systemjs<br>.config.extras.js</code>
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td>
|
2017-03-31 19:57:13 -04:00
|
|
|
|
|
|
|
|
|
Optional extra SystemJS configuration.
|
2017-05-29 03:10:44 -04:00
|
|
|
|
A way to add SystemJS mappings, such as for application _barrels_,
|
2017-03-31 19:57:13 -04:00
|
|
|
|
without changing the original `system.config.js`.
|
2017-07-22 23:51:25 -04:00
|
|
|
|
|
|
|
|
|
可选的额外 SystemJS 配置。
|
2018-03-03 08:06:01 -05:00
|
|
|
|
是添加 SystemJS 映射的途径,例如在无需修改原始`systemjs.config.js`的情况下为应用映射*封装桶*。
|
2017-07-22 23:51:25 -04:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
|
|
<td>
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
<code>tsconfig.json</code>
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td>
|
2017-03-31 19:57:13 -04:00
|
|
|
|
|
|
|
|
|
Tells the TypeScript compiler how to transpile TypeScript source files
|
|
|
|
|
into JavaScript files that run in all modern browsers.
|
2017-07-22 23:51:25 -04:00
|
|
|
|
|
2018-03-03 08:06:01 -05:00
|
|
|
|
为 TypeScript 编译器指定如何将 TypeScript 代码转换为 JavaScript 文件,用来在所有现代浏览器中运行。
|
2017-07-22 23:51:25 -04:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
|
|
<td>
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
<code>tslint.json</code>
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td>
|
2017-03-31 19:57:13 -04:00
|
|
|
|
|
|
|
|
|
The `npm` installed TypeScript linter inspects your TypeScript code
|
|
|
|
|
and complains when you violate one of its rules.
|
|
|
|
|
|
2017-07-22 23:51:25 -04:00
|
|
|
|
利用`npm`安装的 TypeScript 语法检查器 (linter) 检测 TypeScript 代码并在你违反它的规则时提示你。
|
|
|
|
|
|
2018-03-03 08:06:01 -05:00
|
|
|
|
This file defines linting rules favored by the
|
2017-04-21 20:21:45 -04:00
|
|
|
|
[Angular style guide](guide/styleguide) and by the authors of the documentation.
|
2017-07-22 23:51:25 -04:00
|
|
|
|
|
2017-07-30 00:32:56 -04:00
|
|
|
|
该文件定义了 [Angular 风格指南](guide/styleguide)与本文档站作者喜爱的语法检查规则。
|
2018-03-03 08:06:01 -05:00
|
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
</table>
|