Options
All
  • Public
  • Public/Protected
  • All
Menu

Nodehawk

Index

Configuration Enumerations

Core Classes

Higher Order Classes

Configuration Interfaces

Core Functions

Utils Functions

Configuration Object literals

Core Functions

assignEnvironmentVariables

  • assignEnvironmentVariables(config: Config): void
  • Assign environemnt variables from the configuration to the process.

    Parameters

    • config: Config

      The configuration object.

    Returns void

checkConfig

  • checkConfig(config: Config): ConfigCheck
  • Checks whether the configuration object types match the ones expected.

    Parameters

    • config: Config

      The configuration object to check.

    Returns ConfigCheck

generateBasePathRelativeToRoot

  • generateBasePathRelativeToRoot(root: string, paths: string | string[]): string | string[]
  • Returns a root-relative joined paths to with the supplied paths.

    Parameters

    • root: string

      A path string resolving to the root directory.

    • paths: string | string[]

      A string or an array of paths to resolve with respect to root.

    Returns string | string[]

loadConfiguration

  • Loads a configuration object. Merging .nodehawkrc (if it exists) and the default configuration file. Otherwise returns the default configuration.

    module

    Utils

    Returns Config

Utils Functions

clearScreen

  • clearScreen(): void
  • Clears the terminal screen.

    Returns void

resolveTypeof

  • resolveTypeof(value: any): string
  • Resolve the type from string, used to validate configuration object.

    Parameters

    • value: any

      Value of the key of configuration object.

    Returns string

Configuration Object literals

Const LogPrefix

LogPrefix: object

DEBUG

DEBUG: string = chalk.grey.bold("[debug]")

ERROR

ERROR: string = chalk.red.bold("[error]")

FATAL

FATAL: string = chalk.redBright.bold("[fatal]")

INFO

INFO: string = chalk.cyan.bold("[info]")

WARN

WARN: string = chalk.yellow.bold("[warn]")

Generated using TypeDoc