This commit is contained in:
Piotr Puszkiewicz 2017-03-09 18:16:20 -08:00
parent c68aba4f63
commit ca9268c504
2 changed files with 25 additions and 80 deletions

View file

@ -1,27 +1,27 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Linq;
using Microsoft.DotNet.Cli.CommandLine;
using LocalizableStrings = Microsoft.DotNet.Tools.Clean.LocalizableStrings;
namespace Microsoft.DotNet.Cli
{
internal static class CleanCommandParser
{
public static Command Clean() =>
Create.Command("clean",
".NET Clean Command",
CommonOptions.HelpOption(),
Create.Option("-o|--output", "Directory in which the build outputs have been placed.",
Accept.ExactlyOneArgument
.With(name: "OUTPUT_DIR")),
Create.Option("-f|--framework", "Clean a specific framework.",
Accept.ExactlyOneArgument
.With(name: "FRAMEWORK")
.WithSuggestionsFrom(_ => Suggest.TargetFrameworksFromProjectFile())),
Create.Option("-c|--configuration",
"Clean a specific configuration.",
Accept.ExactlyOneArgument
.With(name: "CONFIGURATION")
.WithSuggestionsFrom("DEBUG", "RELEASE")));
Create.Command(
"clean",
".NET Clean Command",
Accept.ZeroOrMoreArguments,
CommonOptions.HelpOption(),
Create.Option("-o|--output",
"Directory in which the build outputs have been placed.",
Accept.ExactlyOneArgument
.With(name: "OUTPUT_DIR")
.ForwardAs(o => $"/p:OutputPath={o.Arguments.Single()}")),
CommonOptions.FrameworkOption(),
CommonOptions.ConfigurationOption(),
CommonOptions.VerbosityOption());
}
}