2017-05-26 15:28:06 -04:00
|
|
|
# Anatomy of the Setup Project
|
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.
|
|
|
|
|
|
|
|
Application files _inside the_ **`src/`** and **`e2e/`** folders matter most to developers.
|
|
|
|
|
|
|
|
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-03-30 15:04:18 -04:00
|
|
|
|
2017-03-27 11:08:53 -04:00
|
|
|
<style>
|
|
|
|
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>
|
|
|
|
File
|
|
|
|
</th>
|
|
|
|
|
|
|
|
<th>
|
|
|
|
Purpose
|
|
|
|
</th>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
<td>
|
|
|
|
<code>src/app/</code>
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td>
|
2017-03-31 19:57:13 -04:00
|
|
|
|
|
|
|
|
|
|
|
Angular application files go here.
|
|
|
|
|
|
|
|
Ships with the "Hello Angular" sample's
|
|
|
|
`AppComponent`, `AppModule`, a component unit test (`app.component.spec.ts`), and
|
|
|
|
the bootstrap file, `main.ts`.
|
|
|
|
|
|
|
|
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-03-27 11:08:53 -04:00
|
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
<td>
|
|
|
|
<code>e2e/</code>
|
|
|
|
</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.
|
|
|
|
|
|
|
|
Initialized with an e2e test for the "Hello Angular" sample.
|
2017-03-27 11:08:53 -04:00
|
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
<td>
|
|
|
|
<code>node_modules/</code>
|
|
|
|
</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.
|
|
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
<td>
|
2017-03-31 19:57:13 -04:00
|
|
|
<code>.editorconfig<br>
|
|
|
|
.git/<br>
|
|
|
|
.gitignore<br>
|
|
|
|
.travis.yml</code>
|
2017-03-27 11:08:53 -04:00
|
|
|
</td>
|
|
|
|
|
|
|
|
<td>
|
2017-03-31 19:57:13 -04:00
|
|
|
|
|
|
|
|
|
|
|
Tooling configuration files and folders.
|
|
|
|
Ignore them until you have a compelling reason to do otherwise.
|
2017-03-27 11:08:53 -04:00
|
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
<td>
|
|
|
|
<code>CHANGELOG.md</code>
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td>
|
2017-03-31 19:57:13 -04:00
|
|
|
|
|
|
|
|
|
|
|
The history of changes to the _QuickStart_ repository.
|
|
|
|
Delete or ignore.
|
2017-03-27 11:08:53 -04:00
|
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
<td>
|
|
|
|
<code>favicon.ico</code>
|
|
|
|
</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.
|
|
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
<td>
|
|
|
|
<code>index.html</code>
|
|
|
|
</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.
|
|
|
|
|
|
|
|
The same `index.html` satisfies all documentation application samples.
|
2017-03-27 11:08:53 -04:00
|
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
<td>
|
|
|
|
<code>karma.conf.js</code>
|
|
|
|
</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-03-27 11:08:53 -04:00
|
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
<td>
|
|
|
|
<code>karma-test-shim.js</code>
|
|
|
|
</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-03-27 11:08:53 -04:00
|
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
<td>
|
|
|
|
<code>non-essential-files.txt</code>
|
|
|
|
</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-03-27 11:08:53 -04:00
|
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
<td>
|
|
|
|
<code>LICENSE</code>
|
|
|
|
</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.
|
|
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
<td>
|
|
|
|
<code>package.json</code>
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td>
|
2017-03-31 19:57:13 -04:00
|
|
|
|
|
|
|
|
|
|
|
Identifies `npm `package dependencies for the project.
|
|
|
|
|
|
|
|
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-03-27 11:08:53 -04:00
|
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
<td>
|
|
|
|
<code>protractor.config.js</code>
|
|
|
|
</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-03-27 11:08:53 -04:00
|
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
<td>
|
|
|
|
<code>README.md</code>
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td>
|
2017-03-31 19:57:13 -04:00
|
|
|
|
|
|
|
|
|
|
|
Instruction for using this git repository in your project.
|
|
|
|
Worth reading before deleting.
|
2017-03-27 11:08:53 -04:00
|
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
<td>
|
|
|
|
<code>styles.css</code>
|
|
|
|
</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-03-27 11:08:53 -04:00
|
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
<td>
|
|
|
|
<code>systemjs<br>.config.js</code>
|
|
|
|
</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-03-27 11:08:53 -04:00
|
|
|
<code-example language="ts">
|
|
|
|
import { Component } from '@angular/core;
|
|
|
|
</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.
|
|
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
<td>
|
|
|
|
<code>systemjs<br>.config.extras.js</code>
|
|
|
|
</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-03-27 11:08:53 -04:00
|
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
<td>
|
|
|
|
<code>tsconfig.json</code>
|
|
|
|
</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-03-27 11:08:53 -04:00
|
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
<td>
|
|
|
|
<code>tslint.json</code>
|
|
|
|
</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.
|
|
|
|
|
|
|
|
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-03-27 11:08:53 -04:00
|
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|