Lupa API Reference / @pawel-up/lupa/runner / loadLupaConfig
Function: loadLupaConfig()
loadLupaConfig(
root,configPath?):Promise<Config|null>
Defined in: src/runner/config_loader.ts:21
Loads the Lupa configuration from a local file (e.g. lupa.config.ts).
Parameters
root
string
The root directory to search for the configuration file.
configPath?
string
Optional path to the configuration file.
Returns
Promise<Config | null>
A Promise that resolves to the loaded configuration object, or null if not found.
Use When
You need to programmatically load and parse the Lupa configuration from a file.
Example
ts
import { loadLupaConfig, Config } from '@pawel-up/lupa/runner'
const config = await loadLupaConfig('/path/to/root')