API Docs for: 0.3.0
Show:

Config Class

Defined in: lib/config.js:405
Module: main

methods to load the configuration object.

Usage

 var config = require('istanbul').config,
     configObj = config.loadFile();

 console.log(configObj.reporting.reports());

Item Index

Methods

Methods

defaultConfig

() Object static

Defined in lib/config.js:442

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

(
  • file
  • overrides
)
Configuration static

Defined in lib/config.js:420

loads the specified configuration file with optional overrides. Throws when a file is specified and it is not found.

Parameters:

  • file String

    the 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

(
  • obj
  • overrides
)
Configuration static

Defined in lib/config.js:432

loads the specified configuration object with optional overrides.

Parameters:

  • obj Object

    the 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