lib/task/factory.js
function composite() {
		var configs, type, recipe, tasks, wrapper;

		configs = Configuration.sort(taskInfo, rawConfig, parentConfig);
		tasks = configs.taskInfo.parallel || configs.taskInfo.series || configs.taskInfo.task || configs.subTaskConfigs;
		type = _type();
		if (type) {
			tasks = createTasks(configs);
			recipe = recipes.flow({ recipe: type });
			wrapper = self.create(prefix, {
				name: '<' + type + '>',
				visibility: CONSTANT.VISIBILITY.HIDDEN
			}, configs.taskConfig, recipe, tasks);
			if (configs.taskInfo.name) {
				return self.create(prefix, configs.taskInfo, configs.taskConfig, wrapper, [wrapper]);
			}
			configs.taskInfo.visibility = CONSTANT.VISIBILITY.HIDDEN;
			return wrapper;
		}

		if (_forward()) {
			tasks = createTasks(configs);
			recipe = function (done) {
				return tasks[0].call(this, done);
			};
			return self.create(prefix, configs.taskInfo, configs.taskConfig, recipe, tasks);
		}

		function _type() {
			if (configs.taskInfo.series) {
				return 'series';
			} else if (configs.taskInfo.parallel) {
				return 'parallel';
			} else if (_.size(tasks) > 1) {
				if (Array.isArray(tasks)) {
					return 'series';
				} else if (_.isPlainObject(tasks)) {
					return 'parallel';
				}
			}
		}

		function _forward() {
			return _.size(tasks) === 1;
		}
	}
function composite() {
		var configs, type, recipe, tasks, wrapper;

		configs = Configuration.sort(taskInfo, rawConfig, parentConfig);
		tasks = configs.taskInfo.parallel || configs.taskInfo.series || configs.taskInfo.task || configs.subTaskConfigs;
		type = _type();
		if (type) {
			tasks = createTasks(configs);
			recipe = recipes.flow({ recipe: type });
			wrapper = self.create(prefix, {
				name: '<' + type + '>',
				visibility: CONSTANT.VISIBILITY.HIDDEN
			}, configs.taskConfig, recipe, tasks);
			if (configs.taskInfo.name) {
				return self.create(prefix, configs.taskInfo, configs.taskConfig, wrapper, [wrapper]);
			}
			configs.taskInfo.visibility = CONSTANT.VISIBILITY.HIDDEN;
			return wrapper;
		}

		if (_forward()) {
			tasks = createTasks(configs);
			recipe = function (done) {
				return tasks[0].call(this, done);
			};
			return self.create(prefix, configs.taskInfo, configs.taskConfig, recipe, tasks);
		}

		function _type() {
			if (configs.taskInfo.series) {
				return 'series';
			} else if (configs.taskInfo.parallel) {
				return 'parallel';
			} else if (_.size(tasks) > 1) {
				if (Array.isArray(tasks)) {
					return 'series';
				} else if (_.isPlainObject(tasks)) {
					return 'parallel';
				}
			}
		}

		function _forward() {
			return _.size(tasks) === 1;
		}
	}
function composite ( ) { var configs , type , recipe , tasks , wrapper ; configs = Configuration . sort ( taskInfo , rawConfig , parentConfig ) ; tasks = configs . taskInfo . parallel || configs . taskInfo . series || configs . taskInfo . task || configs . subTaskConfigs ; type = _type ( ) ; if ( type ) { tasks = createTasks ( configs ) ; recipe = recipes . flow ( { recipe : type } ) ; wrapper = self . create ( prefix , { name : '<' + type + '>' , visibility : CONSTANT . VISIBILITY . HIDDEN } , configs . taskConfig , recipe , tasks ) ; if ( configs . taskInfo . name ) { return self . create ( prefix , configs . taskInfo , configs . taskConfig , wrapper , [ wrapper ] ) ; } configs . taskInfo . visibility = CONSTANT . VISIBILITY . HIDDEN ; return wrapper ; } if ( _forward ( ) ) { tasks = createTasks ( configs ) ; recipe = function ( done ) { return tasks [ 0 ] . call ( this , done ) ; } ; return self . create ( prefix , configs . taskInfo , configs . taskConfig , recipe , tasks ) ; } function _type ( ) { if ( configs . taskInfo . series ) { return 'series' ; } else if ( configs . taskInfo . parallel ) { return 'parallel' ; } else if ( _ . size ( tasks ) > 1 ) { if ( Array . isArray ( tasks ) ) { return 'series' ; } else if ( _ . isPlainObject ( tasks ) ) { return 'parallel' ; } } } function _forward ( ) { return _ . size ( tasks ) === 1 ; } }
Composite task should show up in task treem, and show up in cli if holding task is a named task.
Composite task should show up in task treem and show up in cli if holding task is a named task .