Add package-lock and deployment script updates

This commit is contained in:
Krystie
2026-03-23 10:35:29 +01:00
parent 024be9c929
commit 1ac50918ab
3 changed files with 1976 additions and 2 deletions

View File

@@ -33,7 +33,21 @@ Write-Host " All files pass syntax check." -ForegroundColor Green
# 2. Update Frontend
Write-Host "Updating Dashboard UI..." -ForegroundColor Yellow
if (Test-Path "$ProdRoot\sites\status") {
# Build frontend bundles
Write-Host "Building frontend JavaScript..." -ForegroundColor Yellow
Set-Location "$DevRoot\status"
& npm install
& node build.js
if ($LASTEXITCODE -ne 0) {
Write-Error "Frontend build failed!"
exit 1
}
Write-Host " Frontend build complete." -ForegroundColor Green
# Copy all necessary files
Copy-Item "$DevRoot\status\index.html" "$ProdRoot\sites\status\index.html" -Force
Copy-Item "$DevRoot\status\dist\*" "$ProdRoot\sites\status\dist\" -Force
Set-Location $ProdRoot
} else {
Write-Warning "Target status folder not found. Skipping UI update."
}