CounterStrikeSharpTemplates 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet new install CounterStrikeSharpTemplates::1.0.1
This package contains a .NET Template Package you can call from the shell/command line.

CounterStrikeSharpTemplates

NuGet Version License

Description

CounterStrikeSharpTemplates is a thoughtfully designed template set for kick-starting your plugin development for the great CounterStrikeSharp. The templates offer foundational structures and useful functions, along with pre-configured GitHub workflows, making the initiation of plugin development a breeze. With adaptable templates and an automated version control system, it caters to both beginners and experienced developers alike.

Installation

  1. Install the .NET 7.0 SDK.
  2. Install the templates package:
dotnet new install CounterStrikeSharpTemplates

Usage

Currently available templates:

  • default: сreates a basic plugin template.
  • config: сreates a plugin template that includes a configuration file.
  • lang: сreates a plugin template that includes a language file.
  • configlang: сreates a plugin template that includes both a configuration and a language file.
  • datamysql: сreates a plugin template that includes a database (MySQL), language file, configuration file, and commands.

You can also add your own templates.

To specify a template type, use --t:

dotnet new cssharp -n MyPlugin --t config

To create a new basic project (using the default template), just:

dotnet new cssharp -n MyPlugin

For GitHub integration (which provides GitHub workflows, .gitignore, etc.), add --g:

dotnet new cssharp -n MyPlugin --g

Customize with --np (plugin name) and --ap (author):

dotnet new cssharp -n MyPlugin --t datamysql --g --np "My Plugin" --ap "Author Name"

Versioning

Push commit messages with #major, #minor, or #patch to update the plugin's version (when --g is used):

git commit -m "add new feature #minor"

For manual version specification, use the workflow_dispatch option in the GitHub Actions tab.

Environment Variables

In dotnet.yml, modify these variables as needed:

  • PLUGIN_NAME: your plugin's name (please do not use spaces).
  • DOTNET_VERSION: .NET version (default is 7.0.x).
  • PATH_PLUGIN: plugin path (default is addons/counterstrikesharp/plugins/).
  • START_VERSION: starting version (default is 1.0.0).
  • USE_V_VERSION: prefix the version number with a 'v' (default is true).

Conclusion

In the future, additional templates will be added as needed. If you have any ideas on how to improve or modify these templates to make plugin development even easier, please let me know.

Feel free to open an issue or submit a pull request if you have any suggestions or find any problems. Your feedback is always welcome!

Contact

If you have any questions or suggestions, feel free to contact me on Discord: delfram.

Credits

This project was inspired by CounterStrikeSharp. A big thank you to the creators of this project for their contribution to the community and for providing the foundation for the development of these templates. ❤️

  • net7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.1 204 4/11/2024
1.1.0 979 2/16/2024
1.0.1 249 2/12/2024
1.0.0 153 2/12/2024