tasks/usage.js
function addTaskGroup(taskGroup, grunt, parser, descriptionOverrides,
                      formattingOptions) {
  var parserGruntTasks;
  var taskName, taskInfo;
  var n;

  // Create the parser for this group.
  parserGruntTasks = parser.addArgumentGroup({
    title: taskGroup.header ? taskGroup.header : 'Grunt tasks',
    required: false
  });

  // Iterate through all tasks that we want to see in the output.
  for (n = 0; n < taskGroup.tasks.length; ++n) {
    taskName = taskGroup.tasks[n];
    taskInfo = grunt.task._tasks[taskName];

    // Add a task to the argument parser using either the user's
    // description override or its package.json description.
    parserGruntTasks.addArgument(['-' + taskName], {
        'nargs': 0,
        'required': false,
        'help': formatDescription(
          descriptionOverrides[taskName] ?
            descriptionOverrides[taskName] :
            taskInfo.info,
          formattingOptions
        )
      }
    );
  }
}
function addTaskGroup(taskGroup, grunt, parser, descriptionOverrides,
                      formattingOptions) {
  var parserGruntTasks;
  var taskName, taskInfo;
  var n;

  // Create the parser for this group.
  parserGruntTasks = parser.addArgumentGroup({
    title: taskGroup.header ? taskGroup.header : 'Grunt tasks',
    required: false
  });

  // Iterate through all tasks that we want to see in the output.
  for (n = 0; n < taskGroup.tasks.length; ++n) {
    taskName = taskGroup.tasks[n];
    taskInfo = grunt.task._tasks[taskName];

    // Add a task to the argument parser using either the user's
    // description override or its package.json description.
    parserGruntTasks.addArgument(['-' + taskName], {
        'nargs': 0,
        'required': false,
        'help': formatDescription(
          descriptionOverrides[taskName] ?
            descriptionOverrides[taskName] :
            taskInfo.info,
          formattingOptions
        )
      }
    );
  }
}
function addTaskGroup ( taskGroup , grunt , parser , descriptionOverrides , formattingOptions ) { var parserGruntTasks ; var taskName , taskInfo ; var n ; // Create the parser for this group. parserGruntTasks = parser . addArgumentGroup ( { title : taskGroup . header ? taskGroup . header : 'Grunt tasks' , required : false } ) ; // Iterate through all tasks that we want to see in the output. for ( n = 0 ; n < taskGroup . tasks . length ; ++ n ) { taskName = taskGroup . tasks [ n ] ; taskInfo = grunt . task . _tasks [ taskName ] ; // Add a task to the argument parser using either the user's // description override or its package.json description. parserGruntTasks . addArgument ( [ '-' + taskName ] , { 'nargs' : 0 , 'required' : false , 'help' : formatDescription ( descriptionOverrides [ taskName ] ? descriptionOverrides [ taskName ] : taskInfo . info , formattingOptions ) } ) ; } }
Adds a task group to the parser.

@param {Object} taskGroup The task group object
@param {Object} grunt The global Grunt object
@param {ArgumentParser} parser The global ArgumentParser object
@param {Object} descriptionOverrides Task description overrides
@param {Object} formattingOptions Options that determine the formatting
Adds a task group to the parser .