Skip to content

Commit

Permalink
🧑‍💻Added README for templated solutions.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasontaylordev committed Jul 19, 2023
1 parent 9902f45 commit 1aa03dd
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .template.config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@
"**/*.lock.json",
"*.nuspec"
],
"rename": {
"README-template.md": "README.md"
},
"modifiers": [
{
"condition": "(UseAngular)",
Expand Down
4 changes: 2 additions & 2 deletions CleanArchitecture.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<metadata>

<id>Clean.Architecture.Solution.Template</id>
<version>8.0.0-preview.6.6</version>
<version>8.0.0-preview.6.7</version>
<title>Clean Architecture Solution Template</title>
<authors>JasonTaylorDev</authors>
<description>Clean Architecture Solution Template for .NET 8.</description>
<summary>
A Clean Architecture Solution Template for creating a Single-Page Application (SPA) with ASP.NET Core.
</summary>
<releaseNotes>
Update Web API template to include endpoints for using ASP.NET Core Identity.
Added README for solutions generated with the template.
</releaseNotes>

<projectUrl>https://github.com/JasonTaylorDev/CleanArchitecture</projectUrl>
Expand Down
7 changes: 1 addition & 6 deletions CleanArchitecture.sln
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
Directory.Build.props = Directory.Build.props
Directory.Packages.props = Directory.Packages.props
global.json = global.json
README.md = README.md
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Web", "src\Web\Web.csproj", "{4E4EE20C-F06A-4A1B-851F-C5577796941C}"
EndProject
#if (!UseApiOnly)
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Web.AcceptanceTests", "tests\Web.AcceptanceTests\Web.AcceptanceTests.csproj", "{21334974-6B07-47BB-B664-AC62FE58C12B}"
EndProject
#endif
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -68,12 +67,10 @@ Global
{4E4EE20C-F06A-4A1B-851F-C5577796941C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4E4EE20C-F06A-4A1B-851F-C5577796941C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4E4EE20C-F06A-4A1B-851F-C5577796941C}.Release|Any CPU.Build.0 = Release|Any CPU
#if (!UseApiOnly)
{21334974-6B07-47BB-B664-AC62FE58C12B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{21334974-6B07-47BB-B664-AC62FE58C12B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{21334974-6B07-47BB-B664-AC62FE58C12B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{21334974-6B07-47BB-B664-AC62FE58C12B}.Release|Any CPU.Build.0 = Release|Any CPU
#endif
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -86,9 +83,7 @@ Global
{DC37FD87-552C-4613-9F16-1537CA522898} = {664D406C-2F83-48F0-BFC3-408D5CB53C65}
{277029AF-D9E1-4B75-9F11-48FEA7345AD7} = {664D406C-2F83-48F0-BFC3-408D5CB53C65}
{4E4EE20C-F06A-4A1B-851F-C5577796941C} = {6ED356A7-8B47-4613-AD01-C85CF28491BD}
#if (!UseApiOnly)
{21334974-6B07-47BB-B664-AC62FE58C12B} = {664D406C-2F83-48F0-BFC3-408D5CB53C65}
#endif
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3CB609D9-5D54-4C11-A371-DAAC8B74E430}
Expand Down
67 changes: 67 additions & 0 deletions README-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# CleanArchitecture

The project was generated using the [Clean.Architecture.Solution.Template](https://github.com/jasontaylordev/CleanArchitecture) version 8.0.0-preview.6.7.

## Build

Run `dotnet build -tl` to build the solution.

## Run

To run the web application:

```bash
cd .\src\Web\
dotnet watch run
```

Navigate to https://localhost:5001. The application will automatically reload if you change any of the source files.

## Code Scaffolding

The template includes support to scaffold new commands and queries.

Start in the `.\src\Application\` folder.

Create a new command:

```
dotnet new ca-usecase --name CreateTodoList --feature-name TodoLists --usecase-type command --return-type int
```

Create a new query:

```
dotnet new ca-usecase -n GetTodos -fn TodoLists -ut query -rt TodosVm
```

If you encounter the error *"No templates or subcommands found matching: 'ca-usecase'."*, install the template and try again:

```bash
dotnet new install Clean.Architecture.Solution.Template::8.0.0-preview.6.7
```

## Test

The solution contains unit, integration, and acceptance tests.

To run the unit and integration tests (excluding acceptance tests):
```bash
dotnet test --filter "FullyQualifiedName!~AcceptanceTests"
```

To run the acceptance tests, first start the application:

```bash
cd .\src\Web\
dotnet run
```

Then, in a new console, run the tests:
```bash
cd .\src\Web\
dotnet test
```

## Help
To learn more about the template go to the [project website](https://github.com/JasonTaylorDev/CleanArchitecture). Here you can find additional guidance, request new features, report a bug, and discuss the template with other users.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ If you find this project useful, please give it a star. Thanks! ⭐

The easiest way to get started is to install the [.NET template](https://www.nuget.org/packages/Clean.Architecture.Solution.Template):
```
dotnet new install Clean.Architecture.Solution.Template::8.0.0-preview.6.6
dotnet new install Clean.Architecture.Solution.Template::8.0.0-preview.6.7
```

Once installed, create a new solution using the template. You can choose to use Angular, React, or create a Web API-only solution. Specify the client framework using the `-cf` or `--client-framework` option, and provide the output directory where your project will be created. Here are some examples:
Expand Down

0 comments on commit 1aa03dd

Please sign in to comment.