From the course: Learning the Angular CLI
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Setting up build scripts - Angular Tutorial
From the course: Learning the Angular CLI
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.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.