Yeoman generator for empty C# code kata using .NET Core
This generator creates a C# .NET Core solution with the following projects:
- a library project (DLL),
- an associated xUnit test project,
- a console application with a reference to the library project,
- a
tools
folder with a shortcut to JetBrains dupfinder for checking code duplication - static files:
README.md
,.gitignore
- if desired:
LICENSE
(MIT)
The generator asks for the solution name interactively. From that name it derives the names of the generated projects.
Many thanks to JetBrains who provide an Open Source License for this project ❤️.
You need Node.js (LTS or current version) to run the generator.
After you have cloned this repository, execute the following steps once in a command terminal:
- Install the Yeoman scaffolding tool according to the instructions:
npm install -g yo
- Clone this repository and navigate into the cloned folder
- Install the required npm packages:
npm install
- Check whether everything works:
npm run test
- Link the cloned directory to your node modules:
npm link
(see Yeoman: Creating a generator)
- Install the required npm packages:
From any directory execute
yo kata-net-core
Yeoman will prompt for the solution name. Then the generator will create a folder with the specified name. Inside it will create the solution and the projects mentioned above.
To build and test your project
cd <solution folder>
dotnet build
dotnet test
dotnet run --project "<solution name>.App"
cd <cloned generator folder>
git pull
npm install
npm run test
Detailed design documentation can be found in the doc folder.
npm install
npm run test
npm run lint
To continuously monitor the fast running unit tests while developing
npm run test:watch
Before pushing to github, please run all tests including the long running end-to-end tests and the linter
npm run test
npm run lint
For Visual Studio Code, debugger launch configurations allow connecting to the yeoman generator and to the mocha unit tests, respectively.
To launch the Node.js debugger from a console window, enter
npm run debug
npm run complexity
The command above uses the complexity-report-html module to generate two reports
.complexity-report/app.html
shows an overview of complexity by file and function for theapp
folder.complexity-report/test.html
shows an overview of complexity by file and function for thetest
folder
- Yeoman: Yeoman Homepage
- Yeoman: Writing your own yeoman generator
- Yeoman: API documentation
- Yeoman: Debugging Generators
- Yeoman: Yeoman Github repository
- Microsoft: Node.js debugging in VS Code
- Microsoft: Unit testing C# in .NET Core using dotnet test and xUnit
- xUnit.net: xUnit