Skip to content

loadConfig()

PromptScript API


loadConfig(customPath?, files?): Promise<PromptScriptConfig>

Defined in: cli/src/config/loader.ts:71

Load the PromptScript configuration. Follows extends chains, see loadConfigFile.

Parameters

customPath?

string

Optional custom config file path.

files?

string[] = []

Receives the absolute path of the config file and of every file its extends chain reads, the config file first.

Returns

Promise<PromptScriptConfig>

The parsed configuration.

Throws

Error if no config file is found or parsing fails.