mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
chore(doc): update the instructions for setting up dev env. (#603)
ref. #550
This commit is contained in:
+19
-22
@@ -1,6 +1,6 @@
|
||||
# Developer guide: getting your environment set up
|
||||
|
||||
1. Make sure you have `node` installed with a version at _least_ 4.2.3.
|
||||
1. Make sure you have `node` installed with a version at _least_ 5.5.0.
|
||||
2. Run `npm install -g angular-cli` to install the Angular CLI.
|
||||
3. Fork the `angular/material2` repo.
|
||||
4. Clone your fork.
|
||||
@@ -8,40 +8,37 @@
|
||||
and `<your-username>` for your fork. Also see the [team git shortcuts](https://github.com/angular/material2/wiki/Team-git----bash-shortcuts).
|
||||
5. From the root of the project, run `npm install`, then run `npm run typings` to install typescript definitions.
|
||||
|
||||
|
||||
To build the project, run `ng build`.
|
||||
To watch for changes and automatically rebuild, run `ng build --watch`
|
||||
|
||||
To bring up a local server, run `ng serve`. This will automatically watch for changes and rebuild.
|
||||
After the changes rebuild, the browser currently needs to be manually refreshed.
|
||||
|
||||
To run unit tests, run `npm test`.
|
||||
### Running unit tests
|
||||
|
||||
###Running e2e tests:
|
||||
To run unit tests, run `npm test` or use the CLI with `ng test`.
|
||||
|
||||
### Running e2e tests
|
||||
|
||||
To prepare your environment, you'll need to install protractor and selenium.
|
||||
|
||||
1. Globally install protractor:
|
||||
|
||||
```
|
||||
npm install -g protractor
|
||||
```bash
|
||||
# 1. Install the correct selenium version with webdriver-manager (this comes with protractor):
|
||||
npm run webdriver-manager update
|
||||
```
|
||||
|
||||
2. Install the correct selenium version with webdriver-manager (this comes with protractor):
|
||||
In order to run the tests:
|
||||
|
||||
```
|
||||
webdriver-manager update
|
||||
```bash
|
||||
# 1. Spin up a local server with
|
||||
MD_APP=e2e ng serve
|
||||
|
||||
# 2. Run tests with:
|
||||
ng e2e
|
||||
```
|
||||
|
||||
When running the tests:
|
||||
### Running benchmarks
|
||||
Not yet implemented.
|
||||
|
||||
1. Spin up a local server with `ng serve`.
|
||||
|
||||
2. Run tests with:
|
||||
|
||||
```
|
||||
protractor test/protractor.conf.js
|
||||
```
|
||||
|
||||
Running benchmarks: not yet implemented
|
||||
Running screenshot diff tests: not yet implemented
|
||||
### Running screenshot diff tests.
|
||||
Not yet implemented.
|
||||
|
||||
+2
-1
@@ -18,7 +18,8 @@
|
||||
"postinstall": "npm run typings",
|
||||
"e2e": "protractor",
|
||||
"inline-resources": "node ./scripts/release/inline-resources.js ./dist/components",
|
||||
"deploy": "firebase deploy"
|
||||
"deploy": "firebase deploy",
|
||||
"webdriver-manager": "webdriver-manager"
|
||||
},
|
||||
"version": "2.0.0-alpha.5-2",
|
||||
"license": "MIT",
|
||||
|
||||
Reference in New Issue
Block a user