Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b36c21f

Browse filesBrowse files
authored
updated read me description based on code changes
1 parent 8003504 commit b36c21f
Copy full SHA for b36c21f

1 file changed

+9-85Lines changed: 9 additions & 85 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎README.md‎

Copy file name to clipboard
+9-85Lines changed: 9 additions & 85 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,13 @@
1-
# Angular 2 QuickStart Source
1+
# Angular 2 QuickStart With e2e and unit test reporting configured.
22

3-
This repository holds the TypeScript source code of the [angular.io quickstart](https://angular.io/docs/ts/latest/quickstart.html),
4-
the foundation for most of the documentation samples and potentially a good starting point for your application.
3+
The basic scaffolding structue for this app is taken from angular2 Qucik start
4+
[angular.io quickstart](https://angular.io/docs/ts/latest/quickstart.html), and John papa angular basics.
55

6-
It's been extended with testing support so you can start writing tests immediately.
6+
Unit test and E2E are are extended with testing support form basic scaffolding structure and jasime and karma reporters spec reporters.
77

8-
**This is not the perfect arrangement for your application. It is not designed for production.
9-
It exists primarily to get you started quickly with learning and prototyping in Angular 2**
108

11-
We are unlikely to accept suggestions about how to grow this QuickStart into something it is not.
12-
Please keep that in mind before posting issues and PRs.
13-
14-
## Prerequisites
15-
16-
Node.js and npm are essential to Angular 2 development.
17-
18-
<a href="https://docs.npmjs.com/getting-started/installing-node" target="_blank" title="Installing Node.js and updating npm">
19-
Get it now</a> if it's not already installed on your machine.
20-
21-
**Verify that you are running at least node `v5.x.x` and npm `3.x.x`**
22-
by running `node -v` and `npm -v` in a terminal/console window.
23-
Older versions produce errors.
24-
25-
We recommend [nvm](https://github.com/creationix/nvm) for managing multiple versions of node and npm.
26-
27-
## Create a new project based on the QuickStart
28-
29-
Clone this repo into new project folder (e.g., `my-proj`).
30-
```bash
31-
git clone https://github.com/angular/quickstart my-proj
32-
cd my-proj
33-
```
34-
35-
We have no intention of updating the source on `angular/quickstart`.
36-
Discard everything "git-like" by deleting the `.git` folder.
37-
```bash
38-
rm -rf .git // non-Windows
39-
rd .git /S/Q // windows
40-
```
41-
42-
### Create a new git repo
43-
You could [start writing code](#start-development) now and throw it all away when you're done.
44-
If you'd rather preserve your work under source control, consider taking the following steps.
45-
46-
Initialize this project as a *local git repo* and make the first commit:
47-
```bash
48-
git init
49-
git add .
50-
git commit -m "Initial commit"
51-
```
52-
53-
Create a *remote repository* for this project on the service of your choice.
54-
55-
Grab its address (e.g. *`https://github.com/<my-org>/my-proj.git`*) and push the *local repo* to the *remote*.
56-
```bash
57-
git remote add origin <repo-address>
58-
git push -u origin master
59-
```
609
## Install npm packages
6110

62-
> See npm and nvm version notes above
63-
6411
Install the npm packages described in the `package.json` and verify that it works:
6512

6613
**Attention Windows Developers: You must run all of these commands in administrator mode**.
@@ -80,11 +27,9 @@ Both the compiler and the server watch for file changes.
8027

8128
Shut it down manually with Ctrl-C.
8229

83-
You're ready to write your application.
84-
8530
### npm scripts
8631

87-
We've captured many of the most useful commands in npm scripts defined in the `package.json`:
32+
Useful commands in npm scripts defined in the `package.json`:
8833

8934
* `npm start` - runs the compiler and a server at the same time, both in "watch mode".
9035
* `npm run tsc` - runs the TypeScript compiler once.
@@ -97,22 +42,12 @@ with excellent support for Angular apps that use routing.
9742
* `npm run postinstall` - called by *npm* automatically *after* it successfully completes package installation. This script installs the TypeScript definition files this app requires.
9843
Here are the test related scripts:
9944
* `npm test` - compiles, runs and watches the karma unit tests
100-
* `npm run e2e` - run protractor e2e tests, written in JavaScript (*e2e-spec.js)
101-
102-
## Testing
103-
104-
The QuickStart documentation doesn't discuss testing.
105-
This repo adds both karma/jasmine unit test and protractor end-to-end testing support.
106-
107-
These tools are configured for specific conventions described below.
108-
109-
*It is unwise and rarely possible to run the application, the unit tests, and the e2e tests at the same time.
110-
We recommend that you shut down one before starting another.*
45+
* `npm run e2e` - run protractor e2e tests, written in JavaScript (*e2e-spec.js)[*make sure lite server is running for the e2e to work.]
11146

11247
### Unit Tests
11348
TypeScript unit-tests are usually in the `app` folder. Their filenames must end in `.spec`.
11449

115-
Look for the example `app/app.component.spec.ts`.
50+
Look for the example `app/components/app.component.spec.ts`.
11651
Add more `.spec.ts` files as you wish; we configured karma to find them.
11752

11853
Run it with `npm test`
@@ -122,29 +57,18 @@ Both the compiler and the karma watch for (different) file changes.
12257

12358
Shut it down manually with Ctrl-C.
12459

125-
Test-runner output appears in the terminal window.
126-
We can update our app and our tests in real-time, keeping a weather eye on the console for broken tests.
127-
Karma is occasionally confused and it is often necessary to shut down its browser or even shut the command down (Ctrl-C) and
128-
restart it. No worries; it's pretty quick.
129-
130-
The `HTML-Reporter` is also wired in. That produces a prettier output; look for it in `~_test-output/tests.html`.
131-
13260
### End-to-end (E2E) Tests
13361

13462
E2E tests are in the `e2e` directory, side by side with the `app` folder.
13563
Their filenames must end in `.e2e-spec.ts`.
13664

13765
Look for the example `e2e/app.e2e-spec.ts`.
13866
Add more `.e2e-spec.js` files as you wish (although one usually suffices for small projects);
139-
we configured protractor to find them.
67+
protractor is configured to find them.
14068

14169
Thereafter, run them with `npm run e2e`.
14270

143-
That command first compiles, then simultaneously starts the Http-Server at `localhost:8080`
71+
That command first compiles, then simultaneously starts the Http-Server at `localhost:3000`
14472
and launches protractor.
14573

146-
The pass/fail test results appear at the bottom of the terminal window.
147-
A custom reporter (see `protractor.config.js`) generates a `./_test-output/protractor-results.txt` file
148-
which is easier to read; this file is excluded from source control.
149-
15074
Shut it down manually with Ctrl-C.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.