I am creating PowerShell script to automatically build Angular CLI project.
When I use this command in my .ps1 file:
Start-Process -FilePath ng build -WorkingDirectory D:pathToAngularProject -Wait
it works perfectly but create not uglified javascript build. To be able to create production build I need to add '--prod' argument.
But when I change example above on :
Start-Process -FilePath ng build -ArgumentList '--prod' -WorkingDirectory D:pathToAngularProject -Wait
I am getting the error:
Does anyone have a suggestion how can I add an argument to 'ng build' command in PowerShell script?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…