appendix a Setting up the sample project
This appendix covers
- Installing prerequisites
- Installing the Angular CLI, along with Jasmine, Protractor, and Karma
In this book, you’ll use the Angular CLI to run tasks, execute tests, and manage dependencies. In this appendix, we’ll look at the Angular CLI, and you’ll install the tool itself. By installing the Angular CLI, you’ll also install Jasmine, Protractor, and Karma. When you’re finished with that, you’ll get the sample project up and running. Let’s dive in!
Introducing the Angular CLI
One of the major pain points in the past was that setting up an Angular project could be challenging and time-consuming. In March 2017, the Angular team launched a tool called the Angular command-line interface (CLI) to address that issue. The Angular CLI greatly cuts the time it takes to set up an Angular project.
At the time of this writing, the Angular CLI gives you access to about a dozen commands that are useful when creating and maintaining Angular applications. In this book, you’ll mainly use a few of those commands for testing purposes. Table A.1 shows the commands you’ll use and their respective description that we’ll use throughout the book.
Table A.1 Angular CLI commands that you’ll use
Command | Description |
ng test |
Runs your unit tests |
ng e2e |
Runs your end-to-end tests |
For a full list of commands, visit https://github.com/angular/angular-cli/wiki. If you want to learn more about the Angular CLI in general, visit https://cli.angular.io/.