15 lines
462 B
PowerShell
15 lines
462 B
PowerShell
$ErrorActionPreference = "Stop"
|
|
|
|
$repoRoot = Split-Path -Parent $PSScriptRoot
|
|
Set-Location $PSScriptRoot
|
|
$nodeDir = Get-ChildItem -Path (Join-Path $repoRoot ".tools") -Directory -Filter "node-*-win-x64" |
|
|
Sort-Object Name -Descending |
|
|
Select-Object -First 1
|
|
|
|
if (-not $nodeDir) {
|
|
throw "Node.js portable runtime was not found under .tools."
|
|
}
|
|
|
|
$env:Path = "$($nodeDir.FullName);$env:Path"
|
|
& (Join-Path $nodeDir.FullName "npm.cmd") run dev -- --strictPort
|