- get/install all necessary modules from npmjs.com
- get/install all necessary modules for angular-cli
- perform an "ng build" on the angular-cli project
- put the project's javascript bundles in a drop location for deployment
Creating the Build Definition
- On VSTS, navigate to Builds, click on the "New" button.
- Select "Visual Studio" for the build template.
- Select the Repository source. I'm keeping my code in TFS, Observe, there are other options.
- Click "Create"
Overview
At this point, let's take a look at what we're shooting for. This seems like a hack, at this point. But, it gets past some niggling errors.Adding Task Runners to the Definition
- The first npm task runner will get/install all modules listed in your package.json.
- npm command: install
- arguments: (empty)
- The next npm task runner will get/install all modules that applies to angular-cli.
- UPDATE 3/8/17: Do another npm install
- npm command: install
- arguments: (empty)
- The last npm task runner will perform's angular-cli's "ng build" command.
- The previous step references a property in package.json. Make sure this entry appears in that file.
- Let's put the projects bits somewhere. Then, the Release process will have a pickup point to deploy our application. The VSTS agent will find our bits in the "dist" folder.(Contents: **\dist) It will place them in a folder called "drop" (Artifact Name: drop, Artifact Type: Server).
- Save the build definition
Summary
So, with those steps, you should be able to get source, build an angular-cli, build your project and deploy your output to a location for further processing.
Woof!

