create-cssharp-plugin
v0.4.0
Published
***create-cssharp-plugin*** offers a mighty fine project template to get you started quickly.
Maintainers
Readme
Create CounterStrike Sharp Plugin
Bootstrap your CounterStrike Sharp plugin project in no time at all!
create-cssharp-plugin offers a mighty fine project template to get you started quickly.
Features
- [x] Generates a
.slnfile with your.csprojalready referenced* - [x] Bootstraps a
.csentry file withModule(.*)fields populated based on input - [x] Initializes a git repository and stages the project for you
- [x] Comes with a complementary
.gitignoreout of the box!
* dotnet CLI must be installed
Planned and potential features
- [ ] Unit test template
- [ ] Opinionated project structure (directories for commands, hooks, etc.)
- [ ] GitHub actions release workflow (build plugin and generate GH release with plugin artifacts attached)
Prerequisites
You can get NodeJS by going to their website and selecting your OS, node version, and package manager.
https://nodejs.org/en/download
The dotnet CLI should come with .NET SDK.
Install .NET SDK
Linux
-
Windows
Learn more: https://learn.microsoft.com/en-us/dotnet/core/tools/
Installation
Run using your favourite package manager:
Run on-demand via npm:
npx create-cssharp-pluginOR install as a command globally:
npm install -g create-cssharp-plugin
create-cssharp-pluginRun on-demand via yarn:
yarn exec create-cssharp-pluginOR install as a command globally:
yarn global add create-cssharp-plugin
create-cssharp-pluginRun on-demand via pnpm:
pnpm dlx create-cssharp-pluginOR install as a command globally:
pnpm add -g create-cssharp-plugin
create-cssharp-pluginUsage
Interactive prompts
Create your CounterStrikeSharp plugin project using interactive step-by-step prompts in your terminal.
Run create-cssharp-plugin with no arguments to enter interactive mode and follow
the prompts.
ex. npx create-cssharp-plugin
Command-line arguments
Generate your CounterStrikeSharp plugin project directly from the command line.
[!TIP] View CLI options and usage help by passing
-hor--help
create-cssharp-plugin example
create-cssharp-plugin -p differentName example
create-cssharp-plugin -a JohnCSSharp -d "It's CSSharping time" example
[!NOTE] If you specify a project directory as the first positional argument when running
create-cssharp-plugin, all interactive prompts will be skipped and defaults will apply.
Show prompts and skip those set via arguments:create-cssharp-plugin -i example
Forcibly show all prompts with initial values populated from arguments:create-cssharp-plugin -I example
Say yes to all default build tasks (ex. git init) and ask remaining prompts interactively:create-cssharp-plugin -yi examplecreate-cssharp-plugin -yip differentName example
Project Structure
Projects generated using create-cssharp-plugin have the following structure:
./projectName
├── projectName.sln
├── src
│ ├── pluginName.cs
│ └── pluginName.csproj
└── test[!NOTE]
create-cssharp-pluginwill create a project directory relative to your current working directory.
Contributing
- Clone this repository
git clone https://github.com/uFloppyDisk/create-cssharp-plugin.git
cd create-cssharp-plugin- Install dependancies
npm install- Open another shell and watch for changes
npm run dev- Run the CLI
npx .When running the CLI this way, all plugin projects will be placed in the .playground
directory to avoid mixing with the rest of your filesystem and this repo's files.
