src/lib/index.js
function configError(config) {
  if (typeof config !== 'object') { return `the config method must return a config object, got type ${typeof config}`; }
  if (typeof config.entry === 'undefined') { return `No defined entry! 'config.entry' must be defined, got type ${typeof config.entry}.`; }
  if (typeof config.module !== 'object') { return `No defined deployment module! 'config.module' must be an object, got type ${typeof config.module}`; }
  if (typeof config.module.deployment !== 'function') { return `No defined deployment function! 'config.module.deployment' must be type Function (i.e. 'module.deployment = (deploy, contracts, done){}' ), got ${typeof config.module.deployment}`; }
  if (typeof config.module.environment !== 'object') { return `No defined module environment object! 'config.module.environment' must be type Object, got ${typeof config.module.environment}`; }

  const environment = config.module.environment;
  if (typeof environment.provider !== 'object') { return `No defined provider object! 'config.module.environment' must have a defined 'provider' object, got ${typeof environment.provider}`; }
  if (typeof environment.name !== 'string') { return `No defined environment name! 'config.module.environment.name' must be type String, got ${typeof environment.name}`; }

  return null;
}
function configError(config) {
  if (typeof config !== 'object') { return `the config method must return a config object, got type ${typeof config}`; }
  if (typeof config.entry === 'undefined') { return `No defined entry! 'config.entry' must be defined, got type ${typeof config.entry}.`; }
  if (typeof config.module !== 'object') { return `No defined deployment module! 'config.module' must be an object, got type ${typeof config.module}`; }
  if (typeof config.module.deployment !== 'function') { return `No defined deployment function! 'config.module.deployment' must be type Function (i.e. 'module.deployment = (deploy, contracts, done){}' ), got ${typeof config.module.deployment}`; }
  if (typeof config.module.environment !== 'object') { return `No defined module environment object! 'config.module.environment' must be type Object, got ${typeof config.module.environment}`; }

  const environment = config.module.environment;
  if (typeof environment.provider !== 'object') { return `No defined provider object! 'config.module.environment' must have a defined 'provider' object, got ${typeof environment.provider}`; }
  if (typeof environment.name !== 'string') { return `No defined environment name! 'config.module.environment.name' must be type String, got ${typeof environment.name}`; }

  return null;
}
function configError ( config ) { if ( typeof config !== 'object' ) { return ` ${ typeof config } ` ; } if ( typeof config . entry === 'undefined' ) { return ` ${ typeof config . entry } ` ; } if ( typeof config . module !== 'object' ) { return ` ${ typeof config . module } ` ; } if ( typeof config . module . deployment !== 'function' ) { return ` ${ typeof config . module . deployment } ` ; } if ( typeof config . module . environment !== 'object' ) { return ` ${ typeof config . module . environment } ` ; } const environment = config . module . environment ; if ( typeof environment . provider !== 'object' ) { return ` ${ typeof environment . provider } ` ; } if ( typeof environment . name !== 'string' ) { return ` ${ typeof environment . name } ` ; } return null ; }
Validate the config, after the method has been called

@method configError
@param {Object} config the environment object specified in the config.js
@return {Object|Null} output the config error, if any
Validate the config after the method has been called