本文整理匯總了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();
}