Skip to content

API Reference / @gtkx/config / index / loadConfig

Variable: loadConfig ​

const loadConfig: (cwd, options?) => Promise<LoadedConfig>

Defined in: loader.d.ts:34

Loads and validates the gtkx.config.ts file for a project. Writes one deprecation notice to stderr the first time a configuration leaves a future flag unset, recording what it reported in the environment so a child process does not repeat it.

Parameters ​

cwd ​

string

Directory the configuration file is looked up in; parent directories are not searched.

options? ​

LoadConfigOptions

Loading options, such as the environment mode whose overrides are applied.

Returns ​

Promise<LoadedConfig>

Throws ​

When that directory holds no configuration file, or when the configuration fails validation.

Released under the MPL-2.0 License.