• @kipper/config

    Table of contents

    Classes

    Interfaces

    Type Aliases

    Variables

    Type Aliases

    Config

    Ƭ Config<Scheme>: { [key in keyof Scheme]: Scheme[key] extends Object ? string : Scheme[key] extends Object ? string | undefined : Scheme[key] extends Object ? number : Scheme[key] extends Object ? number | undefined : Scheme[key] extends Object ? boolean : Scheme[key] extends Object ? boolean | undefined : Scheme[key] extends Object ? T[] : Scheme[key] extends Object ? T[] | undefined : Scheme[key] extends Object ? Config<P> : Scheme[key] extends Object ? Config<P> | undefined : never }

    A type that directly corresponds to the provided scheme and translates it to a TypeScript type i.e. a representation of what a valid config file would actually look like if it was parsed.

    Type parameters

    Name Type
    Scheme extends ConfigInterpreterScheme

    Defined in

    kipper/config/src/abstract/config-interpreter.ts:52


    ConfigErrorMetaData

    Ƭ ConfigErrorMetaData: Object

    The metadata for a config error, which is used to provide verbose error messages.

    Since

    0.11.0

    Type declaration

    Name Type
    fileName string
    refChain string[]

    Defined in

    kipper/config/src/errors.ts:5


    ConfigInterpreterScheme

    Ƭ ConfigInterpreterScheme: Object

    A type that represents a configuration scheme.

    Since

    0.11.0

    Index signature

    ▪ [key: string]: ConfigInterpreterSchemeDefinition

    Defined in

    kipper/config/src/abstract/config-interpreter.ts:44


    ConfigInterpreterSchemeDefinition

    Ƭ ConfigInterpreterSchemeDefinition: { required: boolean ; type: "string" | "number" | "boolean" } | { itemType: "string" | "number" | "boolean" ; required: boolean ; type: "array" } | { properties: ConfigInterpreterScheme ; required: boolean ; type: "object" } | { possibilities: ({ type: "string" | "number" | "boolean" } | { itemType: "string" | "number" | "boolean" ; type: "array" } | { properties: ConfigInterpreterScheme ; type: "object" })[] ; required: boolean ; type: "union" }

    A type that represents a configuration scheme definition.

    Since

    0.11.0

    Defined in

    kipper/config/src/abstract/config-interpreter.ts:11


    EvaluatedConfigValue

    Ƭ EvaluatedConfigValue: any

    A type that represents a processed configuration value.

    Since

    0.11.0

    Defined in

    kipper/config/src/abstract/evaluated-config-file.ts:5


    KipperConfig

    Ƭ KipperConfig: ConfigKipperConfigScheme\>

    A type that directly corresponds to the KipperConfigScheme and translates it to a TypeScript type i.e. a representation of what a valid config file would actually look like if it was parsed.

    Since

    0.11.0

    Defined in

    kipper/config/src/kipper-config-interpreter.ts:155


    PathLike

    Ƭ PathLike: string

    A type that represents a path-like object.

    Since

    0.11.0

    Defined in

    kipper/config/src/evaluated-kipper-config-file.ts:9

    Variables

    KipperConfigScheme

    Const KipperConfigScheme: Object

    A type that represents a Kipper config file.

    Since

    0.11.0

    Type declaration

    Name Type Description
    basePath { required: false = false; type: "string" = "string" } The base path of the project. This is the path that all other paths are relative to. This is optional and if not provided, the working directory of the invoked Kipper CLI command will be used. Since 0.11.0
    basePath.required false -
    basePath.type "string" -
    compiler { properties: { target: { required: false = false; type: "string" = "string" } ; version: { required: false = false; type: "string" = "string" } } ; required: false = false; type: "object" = "object" } Compiler-specific options. These can be heavily dependent on the compiler version, and as such, the compiler version is also required. Since 0.11.0
    compiler.properties { target: { required: false = false; type: "string" = "string" } ; version: { required: false = false; type: "string" = "string" } } -
    compiler.properties.target { required: false = false; type: "string" = "string" } The target of the compiler. Defaults to "js". Since 0.11.0
    compiler.properties.target.required false -
    compiler.properties.target.type "string" -
    compiler.properties.version { required: false = false; type: "string" = "string" } The version of the compiler. Defaults to "" i.e. any version. Standard NPM-like versioning is used, i.e. the following rules apply: - "1.2.3" will match only "1.2.3". - "~1.2.3", "1.2" and "1.2.x" will match any version from "1.2.3" to "1.2.9999" (inclusive). - "^1.2.3", "1" and "1.x.x" will match any version from "1.2.3" to "1.9999.9999" (inclusive). - "" will match any version. (This is heavily discourage and should only be used for testing.) - … and many more. (Visit the npm docs for more information.) Since 0.11.0
    compiler.properties.version.required false -
    compiler.properties.version.type "string" -
    compiler.required false -
    compiler.type "object" -
    extends { possibilities: ({ itemType?: undefined = "string"; type: "string" = "string" } | { itemType: "string" = "string"; type: "array" = "array" })[] ; required: false = false; type: "union" = "union" } The file that this config file extends. Since 0.11.0
    extends.possibilities ({ itemType?: undefined = "string"; type: "string" = "string" } | { itemType: "string" = "string"; type: "array" = "array" })[] -
    extends.required false -
    extends.type "union" -
    files { itemType: "string" = "string"; required: true = true; type: "array" = "array" } An array of files to compile. They will be all placed in the output directory with preserved directory structure. Note that if a srcDir is provided, the files will be emitted with preserved directory structure relative to the srcDir. This reflects the natural behaviour and means "srcDir/index.kip" is outputted as "outDir/index.smth". This although means any files outside will cause an error. If not provided, the basePath will be used as the source directory and all files are compiled and emitted with preserved directory structure relative to the basePath. (This would mean that even if a "src" is provided, the files would still be emitted with preserved directory structure i.e. "outDir/src/…"). Since 0.11.0
    files.itemType "string" -
    files.required true -
    files.type "array" -
    outDir { required: true = true; type: "string" = "string" } The output directory of the project. This is used as the output directory for all compiled files and resources. Since 0.11.0
    outDir.required true -
    outDir.type "string" -
    resources { itemType: "string" = "string"; required: true = true; type: "array" = "array" } Any resources that are required for the project. They will be copied and placed in the output directory with preserved directory structure. As such, this also means that the compiler enforces a strict "same-origin" policy for resources i.e. resources must be within the basePath of the project. Example: - "logo.png" will be copied to "outDir/logo.png" - "img/" will be copied to "outDir/img/" - "img/logo.png" will be copied to "outDir/img/logo.png" To avoid this behaviour the "origin:dest" syntax can be used. This will copy the origin file to the destination directory (if a directory is provided) or file (can be also used to rename the file). This is useful for resources that should not be placed in the output directory with preserved directory structure. Since 0.11.0
    resources.itemType "string" -
    resources.required true -
    resources.type "array" -
    srcDir { required: false = false; type: "string" = "string" } The source directory of the project. This is optional, as not always a "src" directory is needed. If not provided, the basePath will be used as the source directory and all files are compiled and emitted with preserved directory structure relative to the basePath. (This would mean that even if a "src" is provided, the files would still be emitted with preserved directory structure i.e. "outDir/src/…"). If provided, the files will be emitted with preserved directory structure relative to the srcDir. This reflects the natural behaviour and means "srcDir/index.kip" is outputted as "outDir/index.smth". This although means any files outside will cause an error.
    srcDir.required false -
    srcDir.type "string" -

    Defined in

    kipper/config/src/kipper-config-interpreter.ts:28


    author

    Const author: "Luna Klatzer"

    Defined in

    kipper/config/src/index.ts:17


    github

    Const github: "https://github.com/Kipper-Lang/Kipper"

    Defined in

    kipper/config/src/index.ts:21


    license

    Const license: "GPL-3.0-or-later"

    Defined in

    kipper/config/src/index.ts:19


    name

    Const name: "\@kipper/config"

    Defined in

    kipper/config/src/index.ts:13


    version

    Const version: "0.12.0"

    Defined in

    kipper/config/src/index.ts:15