You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+28-10Lines changed: 28 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,24 @@ It exists primarily to get you started quickly with learning and prototyping in
12
12
We are unlikely to accept suggestions about how to grow this QuickStart into something it is not.
13
13
Please keep that in mind before posting issues and PRs.
14
14
15
+
## Updating to a newer version of the Quickstart Repo
16
+
17
+
From time to time the QuickStart will add be enhanced with support for new features or to reflect
18
+
changes to the [official Style Guide](https://angular.io/docs/ts/latest/guide/style-guide.html).
19
+
20
+
You can update your existing project to an up-to-date QuickStart by following these instructions:
21
+
- Create a new project using the [instructions below](#create-a-new-project-based-on-the-quickstart)
22
+
- Copy the code you have in your project's `main.ts` file onto `src/app/main.ts` in the new project
23
+
- Copy your old `app` folder into `src/app`
24
+
- Delete `src/app/main.ts` if you have one (we now use `src/main.ts` instead)
25
+
- Copy your old `index.html`, `styles.css` and `tsconfig.json` into `src/`
26
+
- Install all your third party dependencies
27
+
- Copy your old `e2e/` folder into `e2e/`
28
+
- Copy over any other files you added to your project
29
+
- Copy your old `.git` folder into your new project's root
30
+
31
+
Now you can continue working on the new project.
32
+
15
33
## Prerequisites
16
34
17
35
Node.js and npm are essential to Angular development.
@@ -106,16 +124,16 @@ You're ready to write your application.
106
124
We've captured many of the most useful commands in npm scripts defined in the `package.json`:
107
125
108
126
*`npm start` - runs the compiler and a server at the same time, both in"watch mode".
109
-
*`npm run tsc` - runs the TypeScript compiler once.
110
-
*`npm run tsc:w` - runs the TypeScript compiler in watch mode; the process keeps running, awaiting changes to TypeScript files and re-compiling when it sees them.
111
-
*`npm run lite` - runs the [lite-server](https://www.npmjs.com/package/lite-server), a light-weight, static file server, written and maintained by
127
+
*`npm run build` - runs the TypeScript compiler once.
128
+
*`npm run build:w` - runs the TypeScript compiler in watch mode; the process keeps running, awaiting changes to TypeScript files and re-compiling when it sees them.
129
+
*`npm run serve` - runs the [lite-server](https://www.npmjs.com/package/lite-server), a light-weight, static file server, written and maintained by
112
130
[John Papa](https://github.com/johnpapa) and
113
131
[Christopher Martin](https://github.com/cgmartin)
114
132
with excellent support for Angular apps that use routing.
115
133
116
134
Here are the test related scripts:
117
135
*`npm test` - compiles, runs and watches the karma unit tests
118
-
*`npm run e2e` - run protractor e2e tests, written inJavaScript (*e2e-spec.js)
136
+
*`npm run e2e` - compiles and run protractor e2e tests, written inTypescript (*e2e-spec.ts)
119
137
120
138
## Testing
121
139
@@ -128,9 +146,9 @@ These tools are configured for specific conventions described below.
128
146
We recommend that you shut down one before starting another.*
129
147
130
148
### Unit Tests
131
-
TypeScript unit-tests are usually in the `app` folder. Their filenames must end in `.spec`.
149
+
TypeScript unit-tests are usually in the `src/app` folder. Their filenames must end in `.spec.ts`.
132
150
133
-
Look for the example `app/app.component.spec.ts`.
151
+
Look for the example `src/app/app.component.spec.ts`.
134
152
Add more `.spec.ts` files as you wish; we configured karma to find them.
135
153
136
154
Run it with `npm test`
@@ -147,17 +165,17 @@ restart it. No worries; it's pretty quick.
147
165
148
166
### End-to-end (E2E) Tests
149
167
150
-
E2E tests are in the `e2e` directory, side by side with the `app` folder.
168
+
E2E tests are in the `e2e` directory, side by side with the `src` folder.
151
169
Their filenames must end in`.e2e-spec.ts`.
152
170
153
171
Look for the example `e2e/app.e2e-spec.ts`.
154
172
Add more `.e2e-spec.js` files as you wish (although one usually suffices for small projects);
155
-
we configured protractor to find them.
173
+
we configured Protractor to find them.
156
174
157
175
Thereafter, run them with `npm run e2e`.
158
176
159
-
That command first compiles, then simultaneously starts the Http-Server at `localhost:8080`
160
-
and launches protractor.
177
+
That command first compiles, then simultaneously starts the `lite-server` at `localhost:8080`
178
+
and launches Protractor.
161
179
162
180
The pass/fail test results appear at the bottom of the terminal window.
163
181
A custom reporter (see `protractor.config.js`) generates a `./_test-output/protractor-results.txt` file
0 commit comments