|
1 | | -# create-dotnet-app |
2 | | -Powershell script to scaffold .NET applications |
| 1 | +# Clean Architecture .NET Solution Scaffolder |
| 2 | + |
| 3 | +This PowerShell script streamlines the creation of a complete .NET solution structured according to Clean Architecture principles. |
| 4 | + |
| 5 | +Features: |
| 6 | + |
| 7 | +- [X] Multi-language support (C# and F#) |
| 8 | +- [X] Compatibility with multiple .NET versions |
| 9 | +- [X] Support for various presentation projects (API, MVC, Console, and Service Worker) |
| 10 | + |
| 11 | +## Setup |
| 12 | + |
| 13 | +To set up in your CLI, first clone this repository to a location on your operating system. Then, run the commands above to configure the alias. |
| 14 | + |
| 15 | +>Note: the /path/to/your/script/ is where the repository was cloned on your OS. |
| 16 | +
|
| 17 | +### MacOs |
| 18 | + |
| 19 | +1. You can open this file in a text editor. If the file doesn't exist, you can create it. |
| 20 | + |
| 21 | +```bash |
| 22 | +nano ~/.zshrc |
| 23 | +```` |
| 24 | + |
| 25 | +2. Add the following line to the file: |
| 26 | + |
| 27 | +```bash |
| 28 | +alias create-dotnet-app='pwsh /path/to/your/script/create-dotnet-app.ps1' |
| 29 | +```` |
| 30 | +
|
| 31 | +3. After saving the file, apply the changes by running: |
| 32 | +
|
| 33 | +```bash |
| 34 | +source ~/.zshrc |
| 35 | +``` |
| 36 | + |
| 37 | +### Linux |
| 38 | + |
| 39 | +```bash |
| 40 | +nano ~/.bashrc |
| 41 | +``` |
| 42 | + |
| 43 | +2. Add the following line to the file: |
| 44 | + |
| 45 | +```bash |
| 46 | +alias create-dotnet-app='pwsh /path/to/your/script/create-dotnet-app.ps1' |
| 47 | +```` |
| 48 | + |
| 49 | +3. After saving the file, apply the changes by running: |
| 50 | + |
| 51 | +```bash |
| 52 | +source ~/.bashrc |
| 53 | +``` |
| 54 | + |
| 55 | +### Windows |
| 56 | + |
| 57 | +```bash |
| 58 | +notepad $PROFILE |
| 59 | +``` |
| 60 | + |
| 61 | +2. Add the following function to the profile script: |
| 62 | + |
| 63 | +```bash |
| 64 | +function create-dotnet-app { |
| 65 | + param ( |
| 66 | + [string]$solutionName, |
| 67 | + [string]$dotnetVersion = "net8.0", |
| 68 | + [string]$language = "C#", |
| 69 | + [string]$presentationType = "api" |
| 70 | + ) |
| 71 | + & 'C:\Path\To\Your\Script\create-dotnet-app.ps1' -solutionName $solutionName -dotnetVersion $dotnetVersion -language $language -presentationType $presentationType |
| 72 | +} |
| 73 | +```` |
| 74 | +
|
| 75 | +3. After saving the file, apply the changes by running: |
| 76 | +
|
| 77 | +```bash |
| 78 | +. $PROFILE |
| 79 | +``` |
| 80 | + |
0 commit comments