Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ImperativeConfig

This class is used to contain all configuration being set by Imperative. It is a singleton and should be accessed via ImperativeConfig.instance.

Hierarchy

  • ImperativeConfig

Index

Properties

Private mCallerLocation

mCallerLocation: string = null

This parameter is used to contain the caller location of imperative configuration file.

Private mHostPackageName

mHostPackageName: string

This is the package name of the host application. It will only be set once accessed to lessen loads to the host package.json.

Private mImperativePackageName

mImperativePackageName: string

This is the name of our imperative package. It will only be set once accessed to lessen loads to the imperative package.json.

It isn't hardcoded so that the name of our package can change without affecting modules dependent on it.

Private mLoadedConfig

mLoadedConfig: IImperativeConfig = null

This parameter is used as the container of all loaded configuration for Imperative.

Private mRootCommandName

mRootCommandName: string

This is our calling CLI's command name (taken from package.json: bin).

Static Private mInstance

mInstance: ImperativeConfig = null

This is the variable that stores the specific instance of Imperative Config. Defined as static so that it can be accessed from anywhere.

Accessors

callerLocation

  • get callerLocation(): string
  • set callerLocation(location: string): void

callerPackageJson

  • get callerPackageJson(): any

cliHome

  • get cliHome(): string

hostPackageName

  • get hostPackageName(): string

imperativePackageName

  • get imperativePackageName(): string

loadedConfig

profileDir

  • get profileDir(): string

rootCommandName

  • get rootCommandName(): string
  • set rootCommandName(rootCommandName: string): void

Static instance

Methods

findPackageBinName

  • findPackageBinName(): string

getCallerFile

  • getCallerFile(file: string): any

Generated using TypeDoc