generated from kemboi22/laravel-inertia-starter-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-build.ps1
More file actions
23 lines (20 loc) · 840 Bytes
/
test-build.ps1
File metadata and controls
23 lines (20 loc) · 840 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Write-Host "Testing Vite build..." -ForegroundColor Yellow
try {
Write-Host "Running npm run build..." -ForegroundColor Cyan
npm run build
if ($LASTEXITCODE -eq 0) {
Write-Host "✅ Build successful!" -ForegroundColor Green
} else {
Write-Host "❌ Build failed with exit code: $LASTEXITCODE" -ForegroundColor Red
}
} catch {
Write-Host "❌ Build error: $($_.Exception.Message)" -ForegroundColor Red
}
Write-Host "`nChecking build output..." -ForegroundColor Yellow
if (Test-Path "public/build") {
Write-Host "✅ Build directory exists" -ForegroundColor Green
$files = Get-ChildItem "public/build" -Recurse | Measure-Object
Write-Host "Files in build directory: $($files.Count)" -ForegroundColor Cyan
} else {
Write-Host "❌ Build directory not found" -ForegroundColor Red
}