index.js
function invokeCommand(command, argv, isInternalCommand) {

  const globs = getGlobs();

  if (globs.length === 0) {
    return invokeCommandError(command, isInternalCommand);
  }

  const modulesAnswered = getModulesAnswered(command, argv, globs);
  const modulesAnsweredLength = modulesAnswered.length;

  if (modulesAnsweredLength === 0) {
    return invokeCommandError(command, isInternalCommand);
  }

  const modulesAnsweredPlural = modulesAnsweredLength === 1 ? 'module' : 'modules';

  logger.verbose(
    `Successfully passed ${command} to ${modulesAnsweredLength} ${modulesAnsweredPlural}:`
  );
  logger.verbose(modulesAnswered.join(', '));
}
function invokeCommand(command, argv, isInternalCommand) {

  const globs = getGlobs();

  if (globs.length === 0) {
    return invokeCommandError(command, isInternalCommand);
  }

  const modulesAnswered = getModulesAnswered(command, argv, globs);
  const modulesAnsweredLength = modulesAnswered.length;

  if (modulesAnsweredLength === 0) {
    return invokeCommandError(command, isInternalCommand);
  }

  const modulesAnsweredPlural = modulesAnsweredLength === 1 ? 'module' : 'modules';

  logger.verbose(
    `Successfully passed ${command} to ${modulesAnsweredLength} ${modulesAnsweredPlural}:`
  );
  logger.verbose(modulesAnswered.join(', '));
}
function invokeCommand ( command , argv , isInternalCommand ) { const globs = getGlobs ( ) ; if ( globs . length === 0 ) { return invokeCommandError ( command , isInternalCommand ) ; } const modulesAnswered = getModulesAnswered ( command , argv , globs ) ; const modulesAnsweredLength = modulesAnswered . length ; if ( modulesAnsweredLength === 0 ) { return invokeCommandError ( command , isInternalCommand ) ; } const modulesAnsweredPlural = modulesAnsweredLength === 1 ? 'module' : 'modules' ; logger . verbose ( ` ${ command } ${ modulesAnsweredLength } ${ modulesAnsweredPlural } ` ) ; logger . verbose ( modulesAnswered . join ( ', ' ) ) ; }
search for a command in the modules and invoke it if found. If not found,
log a fatal error.
@param {string} command
@param {Object} argv
@param {boolean} isInternalCommand
search for a command in the modules and invoke it if found . If not found log a fatal error .