BannerlordCoop.CLI.Scaffolding 1.0.5

dotnet tool install --global BannerlordCoop.CLI.Scaffolding --version 1.0.5                
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local BannerlordCoop.CLI.Scaffolding --version 1.0.5                
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=BannerlordCoop.CLI.Scaffolding&version=1.0.5                
nuke :add-package BannerlordCoop.CLI.Scaffolding --version 1.0.5                

Bannerlord Coop - Scaffolding

A dotnet CLI scaffolding tool for the Bannerlord Coop project using razor.

Installation

Install via NuGet:

To install the Bannerlord Coop CLI tool, run the following command in your terminal:

dotnet tool install --global BannerlordCoop.CLI.Scaffolding

Build from source

  1. Clone branch, build 'Scaffolderlord' project
  2. Pack:
dotnet pack --configuration Release
  1. Install from local folder:
dotnet tool install --global --add-source ./bin/Release BannerlordCoop

Usage

After installing the dotnet tool globally, just call the root command coop-create specifying a command with it's argument and options, you can use Visual Studio's own package manager console or any other CLI.

The main argument for all commands is the type's fully qualified name and assembly separated by a comma.

Example: coop-create all "TaleWorlds.CampaignSystem.Siege.BesiegerCamp, TaleWorlds.CampaignSystem" --members SiegeEvent SiegeEngines SiegeStrategy NumberOfTroopsKilledOnSide _leaderParty

This will generate ALL template files for BesiegerCamp and even prepare autosync and create e2e and commands for all specified members.

Obs: Be aware that nested types use a '+' instead of a dot on their qualified names, for example SiegeEvent.SiegeEnginesContainer is TaleWorlds.CampaignSystem.Siege.SiegeEvent+SiegeEnginesContainer, TaleWorlds.CampaignSystem"

Main Commands

  • all <type-fully-qualified-name> [--members] [--overwrite]
    Generates a registry class for the specified type.

  • registry <type-fully-qualified-name> [--overwrite]
    Generates a registry class for the specified type.

  • sync <type-fully-qualified-name> [--members] [--overwrite]
    Generates a sync class for the specified type.

  • lifetime <type-fully-qualified-name> [--overwrite]
    Generates all lifetime handling files for specified type.

  • e2e <type-fully-qualified-name> [--members] [--overwrite]
    Generates end-to-end tests.

  • commands <type-fully-qualified-name> [--members] [--overwrite]
    Generates command-related classes (WIP).

  • collections <type-fully-qualified-name> [--members] [--overwrite]
    Generates collection-related classes (WIP).

Options

  • --overwrite: Specifies if existing files should be overwritten, otherwise a new file is created with a suffix (existing files are NOT altered).
  • --members: Specifies which members to include on template generation, for autosync, e2e, commands, etc (currentyl doesn't do collections).
  • --help: Gives details about command.

All Commands

These are the files the CLI can generate

Command File Namespace Output Path
registry TypeNameRegistry.cs GameInterface.Services.TypeNames GameInterface\Services\TypeNames\TypeNameRegistry.cs
sync TypeNameSync.cs GameInterface.Services.TypeNames GameInterface\Services\TypeNames\TypeNameSync.cs
lifetime, lifetime-handler TypeNameLifetimeHandler.cs GameInterface.Services.TypeNames.Handlers GameInterface\Services\TypeNames\Handlers\TypeNameLifetimeHandler.cs
lifetime, lifetime-patches TypeNameLifetimePatches.cs GameInterface.Services.TypeNames.Patches GameInterface\Services\TypeNames\Patches\TypeNameLifetimePatches.cs
lifetime, lifetime-messages-created TypeNameCreated.cs GameInterface.Services.TypeNames.Messages GameInterface\Services\TypeNames\Messages\Lifetime\TypeNameCreated.cs
lifetime, lifetime-messages-destroyed TypeNameDestroyed.cs GameInterface.Services.TypeNames.Messages GameInterface\Services\TypeNames\Messages\Lifetime\TypeNameDestroyed.cs
lifetime, lifetime-messages-create NetworkCreateTypeName.cs GameInterface.Services.TypeNames.Messages GameInterface\Services\TypeNames\Messages\Lifetime\NetworkCreateTypeName.cs
lifetime, lifetime-messages-destroy NetworkDestroyTypeName.cs GameInterface.Services.TypeNames.Messages GameInterface\Services\TypeNames\Messages\Lifetime\NetworkDestroyTypeName.cs
collection, collection-handler TypeName``CollectionNameHandler.cs GameInterface.Services.TypeNames.Handlers GameInterface\Services\TypeNames\Handlers\TypeName``CollectionNameHandler.cs
collection, collection-patches TypeName``CollectionNamePatches.cs GameInterface.Services.TypeNames.Patches GameInterface\Services\TypeNames\Patches\TypeName``CollectionNamePatches.cs
collection, collection-messages-created TypeNameAdded.cs GameInterface.Services.TypeNames.Messages GameInterface\Services\TypeNames\Messages\Collections\CollectionNameAdded.cs
collection, collection-messages-destroyed TypeNameRemoved.cs GameInterface.Services.TypeNames.Messages GameInterface\Services\TypeNames\Messages\Collections\CollectionNameRemoved.cs
collection, collection-messages-create NetworkAddTypeName.cs GameInterface.Services.TypeNames.Messages GameInterface\Services\TypeNames\Messages\Collections\NetworkAddCollectionName.cs
collection, collection-messages-destroy NetworkRemoveTypeName.cs GameInterface.Services.TypeNames.Messages GameInterface\Services\TypeNames\Messages\Collections\NetworkRemoveCollectionName.cs
e2e, e2e-props TypeNamePropertyTests.cs E2E.Tests.Services.TypeNames E2E.Tests\Services\TypeNames\TypeNamePropertyTests.cs
e2e, e2e-fields TypeNameFieldTests.cs E2E.Tests.Services.TypeNames E2E.Tests\Services\TypeNames\TypeNameFieldTests.cs
e2e, e2e-cols TypeNameCollectionTests.cs E2E.Tests.Services.TypeNames E2E.Tests\Services\TypeNames\TypeNameCollectionTests.cs
commands TypeNameCollectionTests.cs GameInterface.Services.TypeNames.Commands; GameInterface\Services\TypeNames\Commands\TypeNameDebugCommands.cs
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
1.0.5 161 11/3/2024
1.0.4 145 11/2/2024