1

I am trying to run ng build in a Windows cmd script. I can't seem to get the script to continue after the ng build command.

Example test.cmd (in an Angular project directory of course):

ng build
echo Done. > done.txt

I get the output from the ng build as expected, but I never get the done.txt file. Anyone know how to get the script to continue past ng build?

ruttergod
  • 167
  • 9

1 Answers1

1

According to @npocmaka's answer on this post. npm or ng itself is a bat (or cmd) file. So you can write your cmd code like this:

@echo off
call npm run build
echo Done. > done.txt
pause
Park Numb
  • 521
  • 3
  • 8