From d48851294d46fd3bc50998243762a78b2a9d38e0 Mon Sep 17 00:00:00 2001 From: Kyle Burrows Date: Tue, 11 Nov 2025 14:52:39 -0500 Subject: [PATCH] update the docs --- .github/workflows/cd-build.yml | 20 ++++++++++---------- README.md | 14 +++++++------- src/DemoApp/DemoApp.csproj | 2 +- src/HelloWorld/HelloWorld.csproj | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/cd-build.yml b/.github/workflows/cd-build.yml index 376d9e8..00d3bff 100644 --- a/.github/workflows/cd-build.yml +++ b/.github/workflows/cd-build.yml @@ -20,16 +20,16 @@ jobs: - name: Restore dependencies run: dotnet restore src/MinimalCli.sln # build solution here instead of project - - name: Build Minimal CommandLine + - name: Build Minimal Command Line run: dotnet build src/MinimalCli.sln -c Release --no-restore # packs all nuget packages at once - - name: Pack MinimalCommandLine Nuget Alpha - run: dotnet pack src/MinimalCli/MinimalCli.csproj -p:PackageVersion=0.5.0.${{github.run_number}}-alpha -o ./packages - - name: Pack MinimalCommandLine Nuget - run: dotnet pack src/MinimalCli/MinimalCli.csproj -p:PackageVersion=0.5.0.${{github.run_number}} -o ./packages + - name: Pack Minimal Command Line Nuget Alpha + run: dotnet pack src/MinimalCli/MinimalCli.csproj -p:PackageVersion=2.0.0.${{github.run_number}}-alpha -o ./packages + - name: Pack Minimal Command Line Nuget + run: dotnet pack src/MinimalCli/MinimalCli.csproj -p:PackageVersion=2.0.0.${{github.run_number}} -o ./packages - - name: Publish MinimalCommandLine Artifacts + - name: Publish Minimal Command Line Artifacts uses: actions/upload-artifact@v4 with: name: Nugets @@ -50,8 +50,8 @@ jobs: - name: Display structure of downloaded files run: ls -R - - name: Push MinimalCommandLine Nuget - run: dotnet nuget push ./MinimalCli.0.5.0.${{github.run_number}}-alpha.nupkg --api-key ${{secrets.NUGETKEY}} --source https://api.nuget.org/v3/index.json + - name: Push Minimal Command Line Nuget + run: dotnet nuget push ./MinimalCli.2.0.0.${{github.run_number}}-alpha.nupkg --api-key ${{secrets.NUGETKEY}} --source https://api.nuget.org/v3/index.json production: needs: integration @@ -65,5 +65,5 @@ jobs: with: name: Nugets - - name: Push MinimalCommandLine Nuget - run: dotnet nuget push ./MinimalCli.0.5.0.${{github.run_number}}.nupkg --api-key ${{secrets.NUGETKEY}} --source https://api.nuget.org/v3/index.json + - name: Push Minimal Command Line Nuget + run: dotnet nuget push ./MinimalCli.2.0.0.${{github.run_number}}.nupkg --api-key ${{secrets.NUGETKEY}} --source https://api.nuget.org/v3/index.json diff --git a/README.md b/README.md index b58f5fa..981da8f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# System.CommandLine.Minimal +# MinimalCli -> A source generator that sits on top of the `System.CommandLine` namespace +> A source generator that works with the `System.CommandLine` namespace > to give an experience similar to the ASP.Net Core minimal API builders. This library > uses the Hosting libraries so a dotnet developer feels at home. > @@ -52,7 +52,7 @@ will map the parameter `message` to a string Argument called ``. Add a reference to the nuget package `MinimalCommandLine`. -- Via csproj: `` +- Via csproj: `` - Via dotnet cli: `dotnet package add MinimalCommandLine` - Via Visual Studio Menu: * Tools > @@ -74,7 +74,7 @@ using MinimalCli; public class MyCommand { - [Handler("mycommand")] + [Handler("my-command")] public void Run(string myArgument, string? myOption = null) { Console.WriteLine("Arg:{0}, Option:{0}", myArgument, myOption); @@ -83,14 +83,14 @@ public class MyCommand ``` This registers the following: - * A command called `mycommand` to the handler `void Run(..)`. + * A command called `my-command` to the handler `void Run(..)`. * The parameter `myArgument` to an Argument called ``. * The optional parameter `myOption` to an Option called `--my-option`. The command can be called like this: ```bash -mycommand "Foo" --my-option "Bar" +my-command "Foo" --my-option "Bar" ``` Conventionally a `System.CommandLine.Argument` is created when the parameter is required and @@ -105,7 +105,7 @@ using MinimalCli; public class MyCommand { - [Handler("mycommand")] + [Handler("my-command")] public void Execute(string myArgument, [Argument] string? myArgument2 = null) { Console.WriteLine("Arg:{0}, Arg2:{0}", myArgument, myArgument2); diff --git a/src/DemoApp/DemoApp.csproj b/src/DemoApp/DemoApp.csproj index e78e981..9d97823 100644 --- a/src/DemoApp/DemoApp.csproj +++ b/src/DemoApp/DemoApp.csproj @@ -11,7 +11,7 @@ diff --git a/src/HelloWorld/HelloWorld.csproj b/src/HelloWorld/HelloWorld.csproj index ad623de..7bb0f1b 100644 --- a/src/HelloWorld/HelloWorld.csproj +++ b/src/HelloWorld/HelloWorld.csproj @@ -11,7 +11,7 @@