wingspkg/util/config

Types

Config = object
  header*: string
  langConfigs*: Table[string, TConfig]
  outputRootDirs*: HashSet[string]
  skipImport*: bool
An object that stores user configurations.   Source Edit

Lets

CALLER_DIR: string = getCurrentDir()
Directory from which wings is ran from.   Source Edit

Procs

proc initConfig(header: string = DEFAULT_HEADER;
                langConfigs: Table[string, TConfig] = DEFAULT_CONFIGS;
                outputRootDirs: HashSet[string] = DEFAULT_OUTPUT_ROOT_DIRS;
                skipImport: bool = DEFAULT_SKIP_IMPORT): Config {...}{.raises: [],
    tags: [].}
Create a config to be used.   Source Edit
proc parse(filename: string): Config {...}{.raises: [ValueError, GenericError,
    IOError, OSError, JsonParsingError, Exception, KeyError, HttpRequestError,
    LibraryError, SslError, TimeoutError, ProtocolError, ValueError,
    GenericError, OSError], tags: [ReadDirEffect, ReadIOEffect, WriteIOEffect,
                                   RootEffect, TimeEffect, WriteDirEffect].}
Parse the given config file in the path.   Source Edit