Class: Environment#

Hierarchy#

  • Environment

Index#

Constructors#

Properties#

Methods#

Object literals#

Constructors#

constructor#

+ new Environment(cwd: string): Environment

Defined in packages/env/src/environment.ts:56

Parameters:#

NameType
cwdstring

Returns: Environment

Properties#

cwd#

cwd: string

Defined in packages/env/src/environment.ts:58


env#

Optional env: string | string[]

Defined in packages/env/src/environment.ts:48

Current environment.

Methods#

component#

component(name: string): any

Defined in packages/env/src/environment.ts:81

Returns component variables merged with global variables.

If env is not set or require failed, returns an empty object.

Parameters:#

NameTypeDescription
namestringComponent name

Returns: any


global#

global(): any

Defined in packages/env/src/environment.ts:67

Returns global variables.

If env is not set or require failed, returns an empty object.

Returns: any


resetReducers#

resetReducers(): void

Defined in packages/env/src/environment.ts:98

Resets reducers to the defaults.

Returns: void


setReducers#

setReducers(callbackfn: (reducers: Reducer[]) => Reducer[]): void

Defined in packages/env/src/environment.ts:91

Sets list of reducers using the specified callback function.

Parameters:#

NameType
callbackfn(reducers: Reducer[]) => Reducer[]

Returns: void

Object literals#

paths#

paths: object

Defined in packages/env/src/environment.ts:53

Paths of environment files.

Properties:#

NameTypeValue
componentstring"environments/#{environment}/#{component}"
globalstring"environments/#{environment}"