Skip to content

Yeoman generator for empty C# code kata using .NET Core

License

Notifications You must be signed in to change notification settings

wonderbird/generator-kata-net-core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yeoman Generator: .NET Core Kata

Build Status Badge Test Coverage Code Maintainability Issues in Code Technical Debt

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.

Thanks

Many thanks to JetBrains who provide an Open Source License for this project ❤️.

Installation and Usage

Installation

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)

Usage

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"

Updating the Generator

cd <cloned generator folder>
git pull
npm install
npm run test

Development

Detailed Design Documentation

Detailed design documentation can be found in the doc folder.

Building this Project

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

Debugging

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

Analyzing the Code Complexity

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 the app folder
  • .complexity-report/test.html shows an overview of complexity by file and function for the test folder

References

About

Yeoman generator for empty C# code kata using .NET Core

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published