C# Bootstrap (base / project skeleton)
June 27, 2023 ยท View on GitHub
Introduction
This is a repository intended to help you create all the boilerplate to just have a test and library projects in C#. It could be useful if you want to start from scratch a kata or a little exercise or project.
This template will create:
- A
*/TestsNUnit test project using FluentAssertions, NSubstitute, and Faker.NET. - A
*/Domainproject to write your "productive" code. - A working test using a reference to
*/Domainproject. - A
.gitignorefile to just include relevant files in your repository. - A
pre-commitconfiguration in order to follow conventional-commits and formatting c# files.
Prerequisite
How To Start
Use the Template
You have two main ways of starting a project from this template:
Use this templatebutton from Github interface.- Using dotnet tamplate:
dotnet new codely-basic --name <YourProjectName>. First, you need to install the template by:- Clone the repository
- Run:
dotnet new install ./
While first is easier from GitHub interface, second one allow you to have a local way of creating as many projects you want with this structure just by installing the template the first time.
Working with the workspace
- Install pre-commit hooks with:
pre-commit install --install-hooks -t pre-commit -t commit-msg - Build the project:
dotnet build - Run tests:
dotnet test. - Start coding!
About
This hopefully helpful utility has been developed by CodelyTV and contributors.
We'll try to maintain this project as simple as possible, but Pull Requests are welcomed!
๐ก Related repositories
License
The MIT License (MIT). Please see License File for more information.