# Build the plugin UI (Vue + Element Plus) into ../ui/. # Usage (from repo root): # powershell -ExecutionPolicy Bypass -File "plugins\XQ0001-0100\XQ0052 ...\ui-src\_build.ps1" $ErrorActionPreference = 'Stop' $here = Split-Path -Parent $MyInvocation.MyCommand.Path Push-Location $here try { if (-not (Test-Path 'node_modules')) { npm install --no-audit --no-fund if ($LASTEXITCODE -ne 0) { throw "npm install failed (exit $LASTEXITCODE)" } } node (Join-Path $here 'node_modules\vite\bin\vite.js') build --config (Join-Path $here 'vite.build.config.js') if ($LASTEXITCODE -ne 0) { throw "vite build failed (exit $LASTEXITCODE)" } } finally { Pop-Location } Write-Host "output -> $(Join-Path $here '..\ui')"