For this you’ll first have to use local copy of the CLI, coz addons aren’t officially supported yet. For this do:
git clone https://github.com/angular/angular-cli.git cd angular-cli npm link
npm link is very similar to
npm install -g except that instead of downloading the package from the repo, the just cloned
angular-cli/ folder becomes the global package. Any changes to the files in the
angular-cli/ folder will immediately affect the global
angular-cli package, allowing you to quickly test any changes you make to the cli project.
Now you can use
angular-cli via the command line:
ng new foo cd foo npm link angular-cli ng serve
So now that you have the new app running with local CLI, modify the cli code and restart the app for change to take affect.
For eg. Here I show how to enable Hot Module Reloading using the Angular CLI Addon