Add the `list` gulp tasks, which
prints out a help menu, listing out
all the tasks and workflows, categorised.
The task also accepts flags to specify
either listing just tasks (-t) or just
the workflows (-w)

@private
960338
function(gulp, tasks, workflows, patternConfig) {

        gulp.task('list', function() {

            var printTasks = true,
                printWorkflows = true;

            if (args.t) {
                printWorkflows = false;
            } else if (args.w) {
                printTasks = false;
            }

            if (printTasks) {

                console.log('');
                console.log('');
                console.log(chalk.blue.bold('list of tasks:'));
                console.log(chalk.blue.bold('--------------\n'));

                var allTasks = Object.keys(tasks).sort();

                if (patternConfig && patternConfig.tasks && patternConfig.tasks.ignore.length > 0) {
                    allTasks = allTasks.filter(function(task) {
                        return patternConfig.tasks.ignore.indexOf(task) === -1;
                    });
                }

                _.each(allTasks, function(name) {
                    console.log(chalk.yellow.bold(name));
                    if (tasks[name].help) {
                        console.log('  ' + chalk.gray(tasks[name].help.message));
                    }
                });
            }

            if (printWorkflows) {

                console.log('');
                console.log('');
                console.log(chalk.blue.bold('list of workflows:'));
                console.log(chalk.blue.bold('------------------\n'));

                var workflowNames = _.xor(Object.keys(workflows), Object.keys(tasks));
                _.each(workflowNames.sort(), function(name) {
                    console.log(chalk.yellow.bold(name));
                    console.log(chalk.gray(workflows[name].help.message));

                    if (workflows[name].dep.length > 0) {
                        var end,
                            deps = ' ';

                        _.each(workflows[name].dep, function(dep, i) {
                            end = (workflows[name].dep.length === (i + 1)) ? '.' : ', ';
                            deps = deps + dep + end;
                        });

                        console.log(chalk.white.bold('- tasks run:') + chalk.gray(deps));
                    }

                    console.log('\n');
                });
            }

            console.log('');
            console.log('');
            return gulp;
        });
    }
42594
function createTask(taskId) {
	return function (done) {
		var stream = tasks[taskId].fn(gulp, done);
		if (stream) {
			if (stream.on) stream.on('end', done);
			if (stream.then) stream.then(done);
		}
	};
}
399671
function auxiliary() {
		var recipe, configs, tasks;

		recipe = recipes.stream(taskInfo) || recipes.flow(taskInfo);
		if (recipe) {
			configs = Configuration.sort(taskInfo, rawConfig, parentConfig, recipe.schema);
			if (configs.taskInfo.name !== 'watch' && (!configs.taskInfo.name || !('visibility' in configs.taskInfo))) {
				configs.taskInfo.visibility = CONSTANT.VISIBILITY.HIDDEN;
				configs.taskInfo.name = '<' + configs.taskInfo.name + '>';
			}
			tasks = createTasks(configs);
			return self.create(prefix, configs.taskInfo, configs.taskConfig, recipe, tasks);
		}
	}
996587
def add(self, task_cls):
		

		registry_tag = task_cls.__registry_tag__
		if registry_tag not in self.__registry.keys():
			self.__registry[registry_tag] = [task_cls]
		elif self.__multiple_tasks_per_tag__ is True:
			self.__registry[registry_tag].append(task_cls)
		else:
			raise RuntimeError('Multiple tasks with same tag appended')
1353368
def print
      list.each do |entry|
        entry.headline ? print_headline(entry) : print_task_description(entry)
      end
    end
932751
function(file, tasks, options) {
              /** skip if no tasks or checking Gruntfile */
              if (!tasks.length || file && file === 'Gruntfile.js') {
                return '';
              }

              var result = '* ' + file + ' (' + tasks.length + ')\n\n';

              /** iterate over tasks, add data */
              tasks.forEach(function(task) {
                result += '    [' + task.lineNumber + ' - ' +
                  task.priority + '] ' + task.line.trim() + '\n';

                result += '\n';
              });

              return result;
            }
1327275
function(data, taskList) {
		var tasks = {};

		for (var key in taskList) {
			var module = taskList[key].split('.');
			if (!procsObj[module[0]]) return {
				'err': true,
				'tasks': module
			};
			var procsInst = new procsObj[module[0]](request, response, data);
			if (!procsInst[module[1]]) return {
				'err': true,
				'tasks': module
			};
			tasks[module[0] + '_' + module[1]] = procsInst[module[1]];
		}
		return {
			'err': false,
			'tasks': tasks
		};
	}
148427
function () {
      var arr = [].slice.call( arguments );
      var tasks = [];
      arr.forEach( function ( name ) {
        var prefixer = /^css-/.test( name ) ? 'css-target:' : 'js-target:';
        tasks.push( prefixer + name );
      } );
      grunt.task.run( tasks );
    }
606546
function compileSass() {
    let tasks = [];

    Object.keys(config).forEach((key) => {
        let val = config[key];
        tasks.push(gulp.src(val.src)
            .pipe(plumber({ errorHandler: handleErrors }))
            .pipe(sourcemaps.init())
            .pipe(sass(config.settings))
            .pipe(sourcemaps.write('./'))
            .pipe(gulp.dest(val.dest)));
    });

    return merge(tasks);
}
139505
function createTask(gulp, options, taskFile){
	var fn;
	var extension = path.extname(taskFile);
	var filename = path.basename(taskFile, extension);
	var task = require(taskFile)(gulp, options.data, loadGulpConfig.util, filename);
	if(Array.isArray(task)){
		fn = isFunction(task[task.length - 1]) ? task.pop() : void(0);
		gulp.task(filename, task, fn);
	}else if(isString(task)){
		gulp.task(filename, [task]);
	}else if(isFunction(task)){
		gulp.task(filename, task);
	}else if(isExotic(task)){
		keys(task).map(mapTaskObject.bind(this, filename, task)).forEach(function(task){
			if(task.cmds){
				if(isFunction(task.fn)){
					gulp.task(task.name, task.cmds, task.fn);
				}else{
					gulp.task(task.name, task.cmds);
				}
			}else{
				gulp.task(task.name, task.fn);
			}
		});
	}
}
157920
function defineTaskGroups() {
  const gulpTasks = gulp.tree({ deep: false }).nodes
  const gulpMode = options.parallel ? gulp.parallel : gulp.series
  const groups = Object.keys(options.groups).map(key => [
    key.trim().replace(/[^a-z]+/gi, ''),
    options.groups[key]
  ])

  groups.forEach(group => {
    const [name, value] = group
    let children = []

    if (Array.isArray(value)) {
      children = value
    } else if (typeof value === 'function') {
      children = gulpTasks
        .filter(value)
        // Group tasks should not call themselves/other groups
        .filter(child => !groups.includes(child))
    } else {
      return
    }

    if (children.length === 0) {
      gulp.task(name, done => {
        handleError(new Error(`No tasks found in '${name}' group`))
        done()
      })
    } else {
      gulp.task(name, gulpMode.apply(null, children))
    }
  })
}
239466
private function showlist()
     {
        $this->getMessage('help');

        foreach ($this->options as $opt) {
            echo "\n";
            echo "\t \t \t", $this->log(" ".$opt['name']." => ".$opt['description']." ", 'success');
            echo "\n";
        }
     }
318882
def _help():
	''''''
	for task in sorted(TASKS, key=lambda x: (x.ns or '000') + x.name):
		tags = ''
		if task is DEFAULT:
			tags += '*'
		if task is SETUP:
			tags += '+'
		if task is TEARDOWN:
			tags += '-'

		print LOCALE['help_command'].format(task, tags, task.help)

		if task.aliases:
			print LOCALE['help_aliases'].format(task.aliasstr())
		if task.reqs:
			print LOCALE['help_reqs'].format(task.reqstr())
		if task.gens:
			print LOCALE['help_gens'].format(task.gens)
		if task.args or task.defaults:
			print LOCALE['help_args'].format(task.ns + task.name, task.kwargstr(), task.argstr())
476878
function addExampleFiles(options) {


  return new Promise(function(resolve, reject) {
    var templateFile = path.join(__dirname, '../template/cli.html');
    var tasks = [];

    tasks.push(writeHTMLFile(options));
    // add necessary JS files
    tasks.push(copyFileToDir('specificity-graph-standalone.js', options.directory))
    tasks.push(copyFileToDir('example.js', options.directory));

    // make sure all these aync tasks are done.
    Promise.all(tasks).then(resolve,reject);
  });
}
906430
function prepareTasks (allTasks, support) {
    const tasks = {before: {}, after: {}};
    let i;

    for (i = allTasks.length - 1; i >= 0; i--) {
        const task = allTasks[i];

        //browser compatibility
        if (!needFix(support, task, 'forBrowsersLowerThan')) {
            continue;
        }

        if (!needFix(support, task, 'forBrowsersUpperOrEqualTo')) {
            continue;
        }

        //Get type and name
        let types, names;

        if (typeof task.filter === 'string') {
            types = [task.filter];
            names = ['_'];
        } else {
            types = (task.filter.type instanceof Array ? task.filter.type : (task.filter.type ? [task.filter.type] : ['_']));
            names = (task.filter.name instanceof Array ? task.filter.name : (task.filter.name ? [task.filter.name] : ['_']));
        }

        types.forEach(function (type) {
            if (!tasks[task.position].hasOwnProperty(type)) {
                tasks[task.position][type] = {};
            }

            names.forEach(function (name) {
                if (!tasks[task.position][type].hasOwnProperty(name)) {
                    tasks[task.position][type][name] = [];
                }

                tasks[task.position][type][name].push(task);
            });
        });
    }

    return tasks;
}
759170
function list (builder, node) {
	finishPending (builder);

	var key = node [1];
	var sub = subBuilder (builder);

	dispatch.nodes (sub, builder.dispatch, node, 2, node.length);

	var template = getTemplate (sub);
	appendNode (builder, spec.listNode (key, template));
}
807659
void addTaskToChain(Task[] tasks, Task task, int index) {
        task.setNext(tasks[index]);
        tasks[index] = task;
    }