Ab-Integro / tools /localisation.ps1
Ame
feat: merge all validation tools into unified tools/validate.mjs
2a8d2d3
Raw
History Blame Contribute Delete
516 Bytes
param(
[Parameter(Position = 0)]
[ValidateSet("build", "source", "check")]
[string]$Command = "build",
[Parameter(Position = 1)]
[ValidateRange(1, 64)]
[int]$Jobs = [Math]::Min([Math]::Max([Environment]::ProcessorCount - 1, 1), 8)
)
if ($Command -eq "check") {
Write-Error "Use node tools/validate.mjs"
exit 1
}
$ErrorActionPreference = "Stop"
$script = Join-Path $PSScriptRoot "localisation.mjs"
& node $script $Command --jobs $Jobs
if ($LASTEXITCODE -ne 0) {
throw "Localisation '$Command' failed."
}