UNPKG

@withstudiocms/config-utils

Version:

Utilities for managing configuration files

16 lines (15 loc) 763 B
/** * Checks whether the specified file or directory exists. * * @param path - The path to the file or directory to check. If `undefined`, the function returns `false`. * @returns `true` if the file or directory exists, otherwise `false`. */ export declare function exists(path: string | undefined): boolean; /** * Searches for the first existing configuration file in the provided list of paths. * * @param projectRootUrl - The root URL or directory of the project. * @param configPaths - An array of relative paths to potential configuration files. * @returns The URL of the first existing configuration file, or `undefined` if none are found. */ export declare function findConfig(projectRootUrl: string, configPaths: string[]): string | undefined;