In my current project I am working on a Service which internally spawns a process which executes a ng serve or a ng build depending on what the cli
ng serve
ng build