本文整理汇总了TypeScript中run-in-terminal.runInTerminal函数的典型用法代码示例。如果您正苦于以下问题:TypeScript runInTerminal函数的具体用法?TypeScript runInTerminal怎么用?TypeScript runInTerminal使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了runInTerminal函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: basename
Object.keys(project.Commands).forEach(key => {
commands.push({
label: `dnx ${key} - (${project.Name || basename(project.Path)})`,
description: dirname(project.Path),
execute() {
lastCommand = this;
let command = join(info.Dnx.RuntimePath, 'bin/dnx');
let args = [key];
// dnx-beta[1-6] needs a leading dot, like 'dnx . run'
if (/-beta[1-6]/.test(info.Dnx.RuntimePath)) {
args.unshift('.');
}
if (isWin) {
command += '.exe';
}
return runInTerminal(command, args, {
cwd: dirname(project.Path),
env: {
// KRE_COMPILATION_SERVER_PORT: workspace.DesignTimeHostPort
}
});
}
});
});
开发者ID:DanielMeixner,项目名称:omnisharp-vscode,代码行数:29,代码来源:commands.ts
示例2: runInTerminal
return serverUtils.requestWorkspaceInformation(server).then(info => {
if ('DotNet' in info && info.DotNet.Projects.length > 0) {
for (let project of info.DotNet.Projects) {
if (project.Path === path.dirname(fileName)) {
return runInTerminal('dotnet', ['restore', fileName], {
cwd: path.dirname(project.Path)
});
}
}
}
return Promise.reject(`Failed to execute restore, try to run 'dotnet restore' manually for ${fileName}.`);
});
开发者ID:Jeffiy,项目名称:omnisharp-vscode,代码行数:13,代码来源:commands.ts
示例3: join
return server.makeRequest<proto.WorkspaceInformationResponse>(proto.Projects).then((info):Promise<any> => {
for(let project of info.Dnx.Projects) {
if (project.Path === fileName) {
let command = join(info.Dnx.RuntimePath, 'bin/dnu');
if (isWin) {
command += '.cmd';
}
return runInTerminal(command, ['restore'], {
cwd: dirname(project.Path)
});
}
}
return Promise.reject(`Failed to execute restore, try to run 'dnu restore' manually for ${fileName}.`)
});
开发者ID:DanielMeixner,项目名称:omnisharp-vscode,代码行数:16,代码来源:commands.ts
示例4: execute
return serverUtils.requestWorkspaceInformation(server).then(info => {
let commands: Command[] = [];
if ('DotNet' in info && info.DotNet.Projects.length > 0) {
for (let project of info.DotNet.Projects) {
commands.push({
label: `dotnet restor - (${project.Name || path.basename(project.Path)})`,
description: path.dirname(project.Path),
execute() {
return runInTerminal('dotnet', ['restore'], {
cwd: path.dirname(project.Path)
});
}
});
}
}
return vscode.window.showQuickPick(commands).then(command => {
if (command) {
return command.execute();
}
});
});
开发者ID:Jeffiy,项目名称:omnisharp-vscode,代码行数:24,代码来源:commands.ts
示例5: runCommandInTerminal
function runCommandInTerminal(args: string[], cwd: string): void {
runInTerminal('npm', args, { cwd: cwd, env: process.env });
}
开发者ID:Gigitsu,项目名称:vscode-npm-scripts,代码行数:3,代码来源:main.ts
示例6: runInTerminal
}).then((solutionDirectory) => {
return runInTerminal('dotnet', ['restore'], {
cwd: solutionPathOrFolder
});
});
开发者ID:ERRLSTAR,项目名称:omnisharp-vscode,代码行数:5,代码来源:commands.ts
注:本文中的run-in-terminal.runInTerminal函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论