Templates
The SimpleW.Templates package provides a simple and efficient way to scaffold new SimpleW modules, services, or projects using dotnet new templates.
It is designed to :
- Standardize module structure
- Reduce boilerplate
- Enforce SimpleW conventions
- Make it easy to create new extensions consistently
This module does not add any runtime dependency to SimpleW.
Features
It allows you to :
- Generate ready-to-use SimpleW modules
- Create consistent project layouts
- Preconfigure
.csprojfiles for SimpleW - Bootstrap new modules in seconds
- Use
dotnet newwith SimpleW-specific templates
Installation
Install the templates package using :
bash
dotnet new install SimpleW.TemplatesYou can browse all the available templates :
bash
dotnet new list simplewAvailable Templates
simplew-minimal
The simplew-minimal template generates a minimal SimpleW application with the smallest possible setup. It's based on the getting started minimum example.
Create a project
bash
# creates a new folder "MySimpleWApp" with the minimal template
dotnet new simplew-minimal -n MySimpleWApp
cd MySimpleWApp
# run it
dotnet run MySimpleWApp.csproj --framework net10.0simplew-controller
The simplew-controller template generates a SimpleW application with controllers. It's based on the getting started controller example.
Create a project
bash
# creates a new folder "MySimpleWAppController" with the controller template
dotnet new simplew-controller -n MySimpleWAppController
cd MySimpleWAppController
# run it
dotnet run MySimpleWAppController.csproj --framework net10.0simplew-aspnetcore
The simplew-aspnetcore template generates a SimpleW application similar to AspNet Core.
Create a project
bash
# creates a new folder "MySimpleWAppNetCore" with the aspnetcore template
dotnet new simplew-aspnetcore -n MySimpleWAppNetCore
cd MySimpleWAppNetCore
# run it
dotnet run MySimpleWAppNetCore.csproj --framework net10.0