2

I'm used to using tsc -w to watch files for changes which will automatically compile them when a change is detected. I am trying to start using angular-cli as a starter. However to see changes, I have to stop the server process, build with ng build, (which rebuilds the whole project, not just the file that changed), and then serve it with ng serve. There must be a better way! I was also surprised that I could not easily find and change what ng build does, like I could for an npm command by looking in package.json.

user3567174
  • 1,898
  • 2
  • 15
  • 18
  • I am just running ng serve and that is watching the files for me and refreshing the browser on file changes... except for stylesheet files for some reason – Jarod Moser Jun 30 '16 at 15:30
  • OK. I should have been more specific to my setup. I am actually running `node dist/server` instead of `ng build`, because I am using an express server (from [this article](https://javascriptrocks.wordpress.com/2016/06/04/express-with-angular-cli-in-5-minutes/)) instead of whatever angular-cli uses. Either way, is there a way to see what is executed with `ng build`, so that I can replace the built in server with call to js file with express commands? – user3567174 Jun 30 '16 at 15:52
  • 1
    So maybe the better question is [how to replace angular-cli server with express](http://stackoverflow.com/questions/38128352/how-to-replace-angular-cli-server-with-express) – user3567174 Jun 30 '16 at 16:09

0 Answers0