UNPKG

hugo-extended

Version:

✏️ Plug-and-play binary wrapper for Hugo Extended, the awesomest static-site generator.

62 lines 1.81 kB
//#region src/lib/env.d.ts /** * Centralized environment variable handling for hugo-extended. * * All environment variables are prefixed with `HUGO_` and provide ways to * customize the installation and runtime behavior of the package. * * @module */ /** * Typed environment configuration object. * Provides a clean API for accessing all Hugo environment variables. */ interface HugoEnvConfig { /** Override the Hugo version to install (ignores package.json) */ overrideVersion: string | undefined; /** Force vanilla Hugo instead of Extended edition */ forceStandard: boolean; /** Skip the postinstall binary download */ skipInstall: boolean; /** Path to a pre-existing Hugo binary */ binPath: string | undefined; /** Custom base URL for Hugo release downloads */ downloadBaseUrl: string | undefined; /** Skip SHA-256 checksum verification */ skipChecksum: boolean; /** Suppress installation progress output */ quiet: boolean; } /** * Reads and parses all Hugo environment variables. * * This function reads from `process.env` each time it's called, * so it will pick up any runtime changes to environment variables. * * @returns Parsed environment configuration * * @example * ```typescript * import { getEnvConfig } from './lib/env'; * * const config = getEnvConfig(); * if (config.skipInstall) { * console.log('Skipping installation'); * } * ``` */ declare function getEnvConfig(): HugoEnvConfig; /** * Metadata about all supported environment variables. * Useful for documentation generation or help output. */ declare const ENV_VAR_DOCS: { key: string; name: string; aliases: string[] | never[]; description: string; type: string; default: false | undefined; }[]; //#endregion export { ENV_VAR_DOCS, HugoEnvConfig, getEnvConfig };