Install WebSPA's npm dependencies before building

This commit is contained in:
Charles Lowell 2017-02-13 12:55:34 -08:00
parent 9d7c588fc5
commit 0cd8ccf54b
2 changed files with 10 additions and 6 deletions

View File

@ -6,16 +6,18 @@ $pubFolderToDelete = $scriptPath + "\pub"
remove-item -path $pubFolderToDelete -Force -Recurse -ErrorAction SilentlyContinue remove-item -path $pubFolderToDelete -Force -Recurse -ErrorAction SilentlyContinue
# *** WebSPA image *** # *** WebSPA image ***
$webSPAPathToJson = $scriptPath + "\src\Web\WebSPA\eShopOnContainers.WebSPA\project.json" $webSPAPath = $scriptPath + "\src\Web\WebSPA\eShopOnContainers.WebSPA"
$webSPAPathToJson = $webSPAPath + "\project.json"
Write-Host "webSPAPathToJson is $webSPAPathToJson" -ForegroundColor Yellow Write-Host "webSPAPathToJson is $webSPAPathToJson" -ForegroundColor Yellow
$webSPAPathToPub = $scriptPath + "\pub\webSPA" $webSPAPathToPub = $scriptPath + "\pub\webSPA"
$webSPAPathToNpmBat = $scriptPath + "\src\Web\WebSPA\eShopOnContainers.WebSPA\buildspa.bat"
Write-Host "webSPAPathToPub is $webSPAPathToPub" -ForegroundColor Yellow Write-Host "webSPAPathToPub is $webSPAPathToPub" -ForegroundColor Yellow
Write-Host "Installing npm dependencies"
Start-Process -WorkingDirectory $webSPAPath -NoNewWindow -Wait npm i
Write-Host "Restore Dependencies just in case as it is needed to run dotnet publish" -ForegroundColor Blue Write-Host "Restore Dependencies just in case as it is needed to run dotnet publish" -ForegroundColor Blue
dotnet restore $webSPAPathToJson dotnet restore $webSPAPathToJson
dotnet build $webSPAPathToJson dotnet build $webSPAPathToJson
# Start-Process "cmd.exe" "/c " + $webSPAPathToNpmBat
dotnet publish $webSPAPathToJson -o $webSPAPathToPub dotnet publish $webSPAPathToJson -o $webSPAPathToPub
# *** identitySvc image *** # *** identitySvc image ***

View File

@ -17,16 +17,18 @@ dotnet build $webPathToJson
dotnet publish $webPathToJson -o $webPathToPub dotnet publish $webPathToJson -o $webPathToPub
# *** WebSPA image *** # *** WebSPA image ***
$webSPAPathToJson = $scriptPath + "\src\Web\WebSPA\eShopOnContainers.WebSPA\project.json" $webSPAPath = $scriptPath + "\src\Web\WebSPA\eShopOnContainers.WebSPA"
$webSPAPathToJson = $webSPAPath + "\project.json"
Write-Host "webSPAPathToJson is $webSPAPathToJson" -ForegroundColor Yellow Write-Host "webSPAPathToJson is $webSPAPathToJson" -ForegroundColor Yellow
$webSPAPathToPub = $scriptPath + "\pub\webSPA" $webSPAPathToPub = $scriptPath + "\pub\webSPA"
$webSPAPathToNpmBat = $scriptPath + "\src\Web\WebSPA\eShopOnContainers.WebSPA\buildspa.bat"
Write-Host "webSPAPathToPub is $webSPAPathToPub" -ForegroundColor Yellow Write-Host "webSPAPathToPub is $webSPAPathToPub" -ForegroundColor Yellow
Write-Host "Installing npm dependencies"
Start-Process -WorkingDirectory $webSPAPath -NoNewWindow -Wait npm i
Write-Host "Restore Dependencies just in case as it is needed to run dotnet publish" -ForegroundColor Blue Write-Host "Restore Dependencies just in case as it is needed to run dotnet publish" -ForegroundColor Blue
dotnet restore $webSPAPathToJson dotnet restore $webSPAPathToJson
dotnet build $webSPAPathToJson dotnet build $webSPAPathToJson
# Start-Process "cmd.exe" "/c " + $webSPAPathToNpmBat
dotnet publish $webSPAPathToJson -o $webSPAPathToPub dotnet publish $webSPAPathToJson -o $webSPAPathToPub
# *** identitySvc image *** # *** identitySvc image ***