# Windows 录制入口(无需 bash/WSL) # Usage: # npm run record:priority1 # powershell -ExecutionPolicy Bypass -File scripts/record-priority1.ps1 # powershell -ExecutionPolicy Bypass -File scripts/record-priority1.ps1 -StartUrl "https://www.priority1.com/" param( [string]$StartUrl ) $ErrorActionPreference = "Stop" $Root = Split-Path -Parent $PSScriptRoot Push-Location $Root try { if ($StartUrl) { npm run record:priority1 -- $StartUrl } else { npm run record:priority1 } if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } } finally { Pop-Location }