mirror of
https://github.com/hansjone/netx.git
synced 2026-10-15 02:33:23 +08:00
This commit is contained in:
parent
a5c9a8f58d
commit
5e80932c4a
1 changed files with 8 additions and 5 deletions
|
|
@ -36,13 +36,16 @@ if (-not $SkipWebBuild) {
|
||||||
throw "npm_not_found"
|
throw "npm_not_found"
|
||||||
}
|
}
|
||||||
Write-Host "==> npm build"
|
Write-Host "==> npm build"
|
||||||
if (-not (Test-Path (Join-Path $webRoot "node_modules"))) {
|
Push-Location $webRoot
|
||||||
& npm.cmd install --prefix $webRoot
|
try {
|
||||||
|
& npm.cmd ci
|
||||||
if ($LASTEXITCODE -ne 0) { throw "npm_install_failed" }
|
if ($LASTEXITCODE -ne 0) { throw "npm_install_failed" }
|
||||||
|
# Release packaging skips tsc (dev CI still uses `npm run build`).
|
||||||
|
& npm.cmd run build:release
|
||||||
|
if ($LASTEXITCODE -ne 0) { throw "web_build_failed" }
|
||||||
|
} finally {
|
||||||
|
Pop-Location
|
||||||
}
|
}
|
||||||
# Release packaging skips tsc (dev CI still uses `npm run build`).
|
|
||||||
& npm.cmd run build:release --prefix $webRoot
|
|
||||||
if ($LASTEXITCODE -ne 0) { throw "web_build_failed" }
|
|
||||||
}
|
}
|
||||||
if (-not (Test-Path (Join-Path $dist "index.html"))) {
|
if (-not (Test-Path (Join-Path $dist "index.html"))) {
|
||||||
throw "web_dist_missing: build web/ or drop -SkipWebBuild"
|
throw "web_dist_missing: build web/ or drop -SkipWebBuild"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue