Refactor template.config into separate config files per template
- Dominant language
- C#
- Stars
- 184
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
### Issue Description:
Currently, all templates are configured within a single `template.config` file, which has grown complex and difficult to maintain due to the number of flags and switches used to differentiate templates. This has created a "Big Ball of Mud" scenario, slowing down development and complicating the addition of new templates.
The goal of this refactoring is to split the existing `template.config` into individual configuration files, one per template. This will:
- Simplify development by isolating template-specific configurations, reducing the likelihood of errors affecting all templates.
- Improve maintainability by making it easier to add new templates—simply create a new config file for each template and describe which files are included.
- Enable the template engine to automatically read the namespace of the current project when the config file is placed in the same folder as the project file (`.csproj`), reducing the need for the user to re-enter the solution and module names.
- Show help specific to the selected template when running the `--help` flag, instead of displaying parameters for all templates.
Instead of running:
```ps1
dotnet new modulith `
--add basic-module `
--module-name Shipments `
--solution eShop
```
The new syntax will simplify the process to:
``` ps1
dotnet new modulith --type basic --module-name Shipments
```
Additionally running the `--help` flag will show help for the specific template selected instead of showing the parameters for all templates
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.