Question: I hope someone has already done this.
I am trying to set up a continuous build in teamcity for one my angular 2 project.
After done some research and I have followed the steps as follows:

1. Build Step1: installed the jonnyzzz.node plugin for the teamcity. (Now I can pick Node.js NPM from Runner type)  

 npm commands: I added install command
2. Build Step 2: Another Node.js NPM and npm commands: install -g angular-cli  

So far so good
3. Now I wanted to build ng build as the third step and I am really stuck as I have no way to do this.

Any help would be appreciated.

Thank you.

Answer: 
In order to get ng build work from nodejs plugin for Team city, I have modified the package.json file.
In start replace the value with "ng build".
And from team city, npm build command will trigger the ng build command.
Rather than changing your package.json you can use the node.js NPM plugin and the run command:

```
run build

```

build it not a default command for NPM so you need the 'run build' which is mapped to ng build in default ng-cli package.json

```
"scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
},

```

[See image](https://i.stack.imgur.com/5DCcq.png)