Use titleCase appname as solutionname

And remove Class1 from wiring.
This commit is contained in:
Kooimanc
2021-10-12 10:16:20 +02:00
parent 06a610ea73
commit 6b07b08027

View File

@@ -1,8 +1,9 @@
$AppName = Read-Host -Prompt 'Input your project (folder) name'
$TargetFolder="../$AppName"
$AppNameTitleCase = (Get-Culture).TextInfo.ToTitleCase($AppName)
#$path = Get-Location
#$newPath = Join-Path -Path $path -ChildPath $TargetFolder
Write-Host "Creating a new project '$AppName' in '$TargetFolder'"
Write-Host "Creating a new project '$AppNameTitleCase' in '$TargetFolder'"
$confirmation = Read-Host "Are you sure you want to proceed? [y/N]"
if ($confirmation -ne 'y') {
Write-Host "Closing.."
@@ -13,7 +14,7 @@ New-Item -ItemType Directory -Force -Path $TargetFolder
Push-Location $TargetFolder
git init
# solution
dotnet new sln -n Solution
dotnet new sln -n $AppNameTitleCase
dotnet new gitignore
dotnet new globaljson
dotnet new nugetconfig
@@ -59,6 +60,7 @@ Copy-Item -Path "files/Wiring.cs" -Destination "$TargetFolder/Wiring"
Remove-Item "$TargetFolder/Domain/Class1.cs" -ErrorAction Ignore
Remove-Item "$TargetFolder/Domain.Tests/Class1.cs" -ErrorAction Ignore
Remove-Item "$TargetFolder/Adapters/Class1.cs" -ErrorAction Ignore
Remove-Item "$TargetFolder/Wiring/Class1.cs" -ErrorAction Ignore
#if (Test-Path $FileName)
#{