mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
2d9f4c4d43
ref. #550
1.4 KiB
1.4 KiB
Developer guide: getting your environment set up
- Make sure you have
nodeinstalled with a version at least 5.5.0. - Run
npm install -g angular-clito install the Angular CLI. - Fork the
angular/material2repo. - Clone your fork.
Recommendation: name your git remotes
upstreamforangular/material2and<your-username>for your fork. Also see the team git shortcuts. - From the root of the project, run
npm install, then runnpm run typingsto 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.
Running unit 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. Install the correct selenium version with webdriver-manager (this comes with protractor):
npm run webdriver-manager update
In order to run the tests:
# 1. Spin up a local server with
MD_APP=e2e ng serve
# 2. Run tests with:
ng e2e
Running benchmarks
Not yet implemented.
Running screenshot diff tests.
Not yet implemented.