Files
future-map-OPEN/core-docs/2026-slideshare-How-To-Use-AI/data/starter-backup-2026-10-06/scripts/preview.ps1
T
2026-10-06 14:43:52 -06:00

13 lines
473 B
PowerShell

[CmdletBinding()]
param([ValidateRange(1024, 65535)][int]$Port = 4200)
$ErrorActionPreference = 'Stop'
$projectRoot = Split-Path -Parent $PSScriptRoot
if (-not (Get-Command quarto -ErrorAction SilentlyContinue)) {
throw 'Quarto is required. See README.md for installation instructions.'
}
Push-Location $projectRoot
try {
& quarto preview presentation.qmd --host 127.0.0.1 --port $Port
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
} finally { Pop-Location }