Skip to content

API Reference / @gtkx/config / index / loadConfig

Variable: loadConfig

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

Defined in: loader.d.ts:32

Loads and validates the gtkx.config.ts file for a project.

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.