src/lib/index.js
function processOutput(plugins, outputObject, configObject, baseContracts, contracts, environment, callback) { // eslint-disable-line
  // the final string to be outputed
  let outputString = JSON.stringify(outputObject, null, 2); // eslint-disable-line

  // the err msg base
  const errMsgBase = 'while processing output with plugins, ';
  if (!Array.isArray(plugins)) { return callback(error(`${errMsgBase}plugins must be type Array, got ${typeof plugins}`)); }

  // process deployers
  try {
    plugins.forEach((plugin) => {
      // process deployer method
      outputString = plugin.process({ output: outputString, config: configObject, baseContracts, contracts, environment });
    });

    // return final output string
    callback(null, outputString);
  } catch (deployerError) {
    callback(error(`${errMsgBase}plugins error: ${deployerError}`));
  }
}
function processOutput(plugins, outputObject, configObject, baseContracts, contracts, environment, callback) { // eslint-disable-line
  // the final string to be outputed
  let outputString = JSON.stringify(outputObject, null, 2); // eslint-disable-line

  // the err msg base
  const errMsgBase = 'while processing output with plugins, ';
  if (!Array.isArray(plugins)) { return callback(error(`${errMsgBase}plugins must be type Array, got ${typeof plugins}`)); }

  // process deployers
  try {
    plugins.forEach((plugin) => {
      // process deployer method
      outputString = plugin.process({ output: outputString, config: configObject, baseContracts, contracts, environment });
    });

    // return final output string
    callback(null, outputString);
  } catch (deployerError) {
    callback(error(`${errMsgBase}plugins error: ${deployerError}`));
  }
}
function processOutput ( plugins , outputObject , configObject , baseContracts , contracts , environment , callback ) { // eslint-disable-line // the final string to be outputed let outputString = JSON . stringify ( outputObject , null , 2 ) ; // eslint-disable-line // the err msg base const errMsgBase = 'while processing output with plugins, ' ; if ( ! Array . isArray ( plugins ) ) { return callback ( error ( ` ${ errMsgBase } ${ typeof plugins } ` ) ) ; } // process deployers try { plugins . forEach ( ( plugin ) => { // process deployer method outputString = plugin . process ( { output : outputString , config : configObject , baseContracts , contracts , environment } ) ; } ) ; // return final output string callback ( null , outputString ) ; } catch ( deployerError ) { callback ( error ( ` ${ errMsgBase } ${ deployerError } ` ) ) ; } }
Process the final load output into string output for file creation.

@method processOutput
@param {Array} plugins the array of plugins, if any
@param {Object} outputObject the deplyed contracts
@param {Object} configObject the config js object
@param {Function} callback the method callback that returns the final string output
@callback {String} outputString the loaded contracts
Process the final load output into string output for file creation .