extensions/gulp/src/main.ts/FolderDetector/computeTasks
class FolderDetector:	private async computeTasks(): Promise<vscode.Task[]> {
		const rootPath = this._workspaceFolder.uri.scheme === 'file' ? this._workspaceFolder.uri.fsPath : undefined;
		const emptyTasks: vscode.Task[] = [];
		if (!rootPath) {
			return emptyTasks;
		}

		if (!await this.hasGulpfile(rootPath)) {
			return emptyTasks;
		}

		const commandLine = `${await this._gulpCommand} --tasks-simple --no-color`;
		try {
			const { stdout, stderr } = await exec(commandLine, { cwd: rootPath });
			if (stderr && stderr.length > 0) {
				// Filter out "No license field"
				const errors = stderr.split('\n');
				errors.pop(); // The last line is empty.
				if (!errors.every(value => value.indexOf('No license field') >= 0)) {
					getOutputChannel().appendLine(stderr);
					showError();
				}
			}
			const result: vscode.Task[] = [];
			if (stdout) {
				const lines = stdout.split(/\r{0,1}\n/);
				for (const line of lines) {
					if (line.length === 0) {
						continue;
					}
					const kind: GulpTaskDefinition = {
						type: 'gulp',
						task: line
					};
					const options: vscode.ShellExecutionOptions = { cwd: this.workspaceFolder.uri.fsPath };
					const task = new vscode.Task(kind, this.workspaceFolder, line, 'gulp', new vscode.ShellExecution(await this._gulpCommand, [line], options));
					result.push(task);
					const lowerCaseLine = line.toLowerCase();
					if (isBuildTask(lowerCaseLine)) {
						task.group = vscode.TaskGroup.Build;
					} else if (isTestTask(lowerCaseLine)) {
						task.group = vscode.TaskGroup.Test;
					}
				}
			}
			return result;
		} catch (err) {
			const channel = getOutputChannel();
			if (err.stderr) {
				channel.appendLine(err.stderr);
			}
			if (err.stdout) {
				channel.appendLine(err.stdout);
			}
			channel.appendLine(localize('execFailed', 'Auto detecting gulp for folder {0} failed with error: {1}', this.workspaceFolder.name, err.error ? err.error.toString() : 'unknown'));
			showError();
			return emptyTasks;
		}
	}