Skip to content

previewDocsSite

Serves the last build with astro preview until it is stopped.

Import:

import { previewDocsSite } from '@mnaoumov/typescript-dev-toolkit/docs-site/docs-site-commands';

Signature:

function previewDocsSite(config: DocsSiteConfig, astroArguments: readonly string[]): Promise<void>

Parameters:

Parameter Type Description
config DocsSiteConfig The site’s configuration.
astroArguments readonly string[] The arguments appended to astro preview, such as --port 4399. Defaults to the script’s own command-line arguments, so npm run docs:preview -- --port 4399 reaches Astro.

Returns: Promise<void>