Use titleCase appname as solutionname
And remove Class1 from wiring.
This commit is contained in:
@@ -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)
|
||||
#{
|
||||
|
||||
Reference in New Issue
Block a user