Saltearse al contenido

astro-integration-utils

Esta página aún no está disponible en tu idioma.

function configResolverBuilder<S>(params: ConfigResolverBuilderOpts<S>): HookUtility<"astro:config:setup", [S["_input"]], Promise<S["_output"]>>

Defined in: astro-integration-utils.ts:23^

Builds a config resolver utility for Astro integrations.

This function creates a utility that loads, validates, and merges configuration from both inline options and config files, using a provided Zod schema for validation. If both inline config and a config file are present, the config file takes precedence during merging.

S extends ZodTypeAny

ConfigResolverBuilderOpts<S>

The configuration resolver options.

HookUtility<"astro:config:setup", [S["_input"]], Promise<S["_output"]>>

A utility function to be used in the Astro config setup hook, which loads, validates, and merges configuration.


function watchConfigFileBuilder(configPaths: WatchConfigFileOptions): HookUtility<"astro:config:setup", [], void>

Defined in: astro-integration-utils.ts:84^

Creates an Astro integration utility that watches for changes in the first existing configuration file found in the provided configPaths. When a configuration file is detected, it is registered for watching using Astro’s addWatchFile mechanism.

WatchConfigFileOptions

An array of possible configuration file paths to check for existence.

HookUtility<"astro:config:setup", [], void>

An Astro integration utility function for the astro:config:setup hook.