简体   繁体   中英

Build multiple angular app with powershell

I am trying to create powershell script, which builds three different angular apps one after another.

It builds only first app and do nothing after. (never reach line with text "3"). No errors

What am I missing?

"1" ;
cd D:\GitNew\App\src\Applications\FT.SomeProject.Web ;

"2" ;
ng build --output-hashing=all --project=app --watch --deploy-url /dist/app/ --output-path wwwroot/dist/app/ ;

"3" ;
ng build --output-hashing=all --project=admin --watch --deploy-url /dist/admin/ --output-path wwwroot/dist/admin/ ;

"4" ;
ng build --output-hashing=all --project=teams --watch --deploy-url /dist/teams/ --output-path wwwroot/dist/teams/ ;

"done" ;
cmd /k ;

Solution - use new window ( start powershell {command} ):

"1" ;
cd D:\GitNew\App\src\Applications\FT.SomeProject.Web ;

"2" ;
start powershell {ng build --output-hashing=all --project=app --watch --deploy-url /dist/app/ --output-path wwwroot/dist/app/ ;}

"3" ;
start powershell {ng build --output-hashing=all --project=admin --watch --deploy-url /dist/admin/ --output-path wwwroot/dist/admin/ ;}

"4" ;
start powershell {ng build --output-hashing=all --project=teams --watch --deploy-url /dist/teams/ --output-path wwwroot/dist/teams/ ;}

"done" ;
cmd /k ;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM