lib/options.js
function(opts) {
		var fs = require('fs');
		if (opts.configFile) {
			try {
				config = JSON.parse(fs.readFileSync(opts.configFile, 'utf-8'));
				if (config) {
					for (var key in opts) {
						if (typeof opts[key] !== 'undefined') {
							config[key] = opts[key];
						}
					}
				}
				opts = config;
			} catch (e) {
				throw new Error('Could not read or parse configuration file - ' + e);
			}
			delete opts.configFile;
		}
		return opts;
	}
function(opts) {
		var fs = require('fs');
		if (opts.configFile) {
			try {
				config = JSON.parse(fs.readFileSync(opts.configFile, 'utf-8'));
				if (config) {
					for (var key in opts) {
						if (typeof opts[key] !== 'undefined') {
							config[key] = opts[key];
						}
					}
				}
				opts = config;
			} catch (e) {
				throw new Error('Could not read or parse configuration file - ' + e);
			}
			delete opts.configFile;
		}
		return opts;
	}
function ( opts ) { var fs = require ( 'fs' ) ; if ( opts . configFile ) { try { config = JSON . parse ( fs . readFileSync ( opts . configFile , 'utf-8' ) ) ; if ( config ) { for ( var key in opts ) { if ( typeof opts [ key ] !== 'undefined' ) { config [ key ] = opts [ key ] ; } } } opts = config ; } catch ( e ) { throw new Error ( 'Could not read or parse configuration file - ' + e ) ; } delete opts . configFile ; } return opts ; }
configFile
configFile