Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Confyglot<YourConfiguration>

Confyglot searches directory trees for configuration files in various formats.

Type parameters

  • YourConfiguration: Record<string, unknown> = Record<string, unknown>

Hierarchy

  • Confyglot

Index

Constructors

Properties

Methods

Constructors

constructor

  • new Confyglot<YourConfiguration>(options?: Partial<Options<YourConfiguration>>): Confyglot<YourConfiguration>
  • Type parameters

    • YourConfiguration: Record<string, unknown> = Record<string, unknown>

    Parameters

    • Optional options: Partial<Options<YourConfiguration>>

    Returns Confyglot<YourConfiguration>

Properties

_options

_options: Options<YourConfiguration>

Optional _validate

_validate: undefined | ValidateFunction<YourConfiguration>

Methods

load

  • load(directoryPath: string, options?: LoadOptions): Promise<undefined | YourConfiguration>
  • Loads the configuration(s) at directoryPath and above to options.root.

    Root is at the top of the tree and directoryPath is presumably somewhere below that. Configurations lower on the tree override properties of configurations higher in the tree. In other words, configurations cascade.

    Parameters

    Returns Promise<undefined | YourConfiguration>

Generated using TypeDoc