<# .SYNOPSIS Builds the QuarkXPress/PageMaker/FreeHand WebAssembly module (dtp.wasm) in Docker and copies it to frontend/vendor/local/dtp@4/, where the site serves it from /vendor/. Nothing is installed on this machine; Docker Desktop must be running. #> $ErrorActionPreference = 'Continue' Set-Location $PSScriptRoot $dist = Join-Path $PSScriptRoot 'dist-dtp' if (Test-Path $dist) { Remove-Item -Recurse -Force $dist } & docker build --target dtp-export --output "type=local,dest=$dist" . if ($LASTEXITCODE -ne 0) { throw 'docker build failed' } $dest = Join-Path $PSScriptRoot '..\..\vendor\local\dtp@4' New-Item -ItemType Directory -Force $dest | Out-Null Copy-Item (Join-Path $dist 'dtp.mjs') $dest -Force Copy-Item (Join-Path $dist 'dtp.wasm') $dest -Force Get-ChildItem $dest | Format-Table Name, Length