From the course: Learning the Angular CLI

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Setting up build scripts

Setting up build scripts - Angular Tutorial

From the course: Learning the Angular CLI

Start my 1-month free trial

Setting up build scripts

- [Instructor] Previously, we generated a build with the following configuration, ng build dash dash configuration equals production. You may want a reusable command to be used in continuous integration and delivery environments, and sometimes, it may be a little long to type in. We can easily set up an npm script for this. Open up the package.json file and let's update the build npm script. We can add here dash dash configuration equals production and we can change the name of this npm script to build colon prod. Now in your terminal, all you need to do is run npm run build colon prod. We can also go ahead and add an npm script for a development build. Let's call that build colon dev and that will simply run ng build. Setting up npm scripts will make automation much easier.

Contents