Config Class
methods to load the configuration object.
Usage
var config = require('istanbul').config,
configObj = config.loadFile();
console.log(configObj.reporting.reports());
Item Index
Methods
- defaultConfig static
- loadFile static
- loadObject static
Methods
defaultConfig
()
Object
static
returns the default configuration object. Note that this is a plain object
and not a Configuration
instance.
Returns:
Object:
an object that represents the default config
loadFile
(
Configuration
static
-
file
-
overrides
loads the specified configuration file with optional overrides. Throws when a file is specified and it is not found.
Parameters:
-
file
Stringthe file to load. If falsy, the default config file, if present, is loaded. If not a default config is used.
-
overrides
Object- an object with override keys that are merged into the config object loaded
Returns:
Configuration:
the config object with overrides applied
loadObject
(
Configuration
static
-
obj
-
overrides
loads the specified configuration object with optional overrides.
Parameters:
-
obj
Objectthe object to use as the base configuration.
-
overrides
Object- an object with override keys that are merged into the config object
Returns:
Configuration:
the config object with overrides applied