本文整理汇总了TypeScript中nuget-task-common/NuGetToolRunner.createNuGetToolRunner函数的典型用法代码示例。如果您正苦于以下问题:TypeScript createNuGetToolRunner函数的具体用法?TypeScript createNuGetToolRunner怎么用?TypeScript createNuGetToolRunner使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了createNuGetToolRunner函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: publishPackageAsync
function publishPackageAsync(packageFile: string, options: PublishOptions): Q.Promise<number> {
let nugetTool = ngToolRunner.createNuGetToolRunner(options.nuGetPath, options.environment);
nugetTool.arg("push");
nugetTool.arg("-NonInteractive");
nugetTool.pathArg(packageFile);
nugetTool.arg(["-Source", options.feedUri]);
nugetTool.argIf(options.apiKey, ["-ApiKey", options.apiKey]);
if (options.configFile) {
nugetTool.arg("-ConfigFile");
nugetTool.pathArg(options.configFile);
}
if (options.verbosity && options.verbosity !== "-") {
nugetTool.arg("-Verbosity");
nugetTool.arg(options.verbosity);
}
if (options.extraArgs) {
nugetTool.argString(options.extraArgs);
}
return nugetTool.exec();
}
示例2: restorePackages
function restorePackages(solutionFile: string, options: RestoreOptions): Q.Promise<number> {
var nugetTool = ngToolRunner.createNuGetToolRunner(options.nuGetPath, options.environment);
nugetTool.arg(options.restoreMode)
nugetTool.arg('-NonInteractive');
nugetTool.pathArg(solutionFile);
if (options.configFile) {
nugetTool.arg('-ConfigFile');
nugetTool.pathArg(options.configFile);
}
if (options.noCache) {
nugetTool.arg('-NoCache');
}
if (options.verbosity && options.verbosity != "-") {
nugetTool.arg("-Verbosity");
nugetTool.arg(options.verbosity);
}
if (options.extraArgs) {
nugetTool.argString(options.extraArgs);
}
return nugetTool.exec({cwd: path.dirname(solutionFile)});
}
示例3: publishPackage
function publishPackage(packageFile: string, options: PublishOptions): Q.Promise<number> {
var nugetTool = ngToolRunner.createNuGetToolRunner(options.nuGetPath, options.environment);
nugetTool.arg('push')
nugetTool.arg('-NonInteractive');
nugetTool.pathArg(packageFile);
nugetTool.arg(["-Source", options.feedUri]);
nugetTool.argIf(options.apiKey, ['-ApiKey', options.apiKey]);
if (options.configFile) {
nugetTool.arg('-ConfigFile');
nugetTool.pathArg(options.configFile);
}
if (options.verbosity) {
nugetTool.arg("-Verbosity");
nugetTool.arg(options.verbosity);
}
if (options.extraArgs) {
nugetTool.argString(options.extraArgs);
}
return nugetTool.exec();
}
示例4: runNuGetAsync
function runNuGetAsync(executionOptions: NuGetExecutionOptions): Q.Promise<number> {
let nugetTool = ngToolRunner.createNuGetToolRunner(executionOptions.nuGetPath, executionOptions.environment);
nugetTool.arg(executionOptions.command);
nugetTool.arg("-NonInteractive");
if (executionOptions.args) {
nugetTool.line(executionOptions.args);
}
return nugetTool.exec();
}