@@ -36,6 +36,32 @@ if (Test-Path $OutputDirectory) {
3636 New-Item - Path $OutputDirectory - ItemType Directory | Out-Null
3737}
3838
39+ # Ensure README is properly set up for NuGet package
40+ Write-Host " [$timestamp ] Setting up README for NuGet package..."
41+ $readmePath = Join-Path $OutputDirectory " README.md"
42+ if (Test-Path $readmePath ) {
43+ Write-Host " [$timestamp ] Updating existing README..."
44+ $readmeContent = Get-Content - Path $readmePath - Raw
45+ # Add template usage instructions at the top
46+ $templateInstructions = " # Clean Architecture Full-Stack Template`n`n "
47+ $templateInstructions += " ## How to use this template`n`n "
48+ $templateInstructions += " ```` n"
49+ $templateInstructions += " dotnet new cleanarch-fullstack --Organization YourCompany --ProjectName YourProductName`n "
50+ $templateInstructions += " ```` n`n "
51+ $templateInstructions += " ## Original README content below`n`n "
52+
53+ Set-Content - Path $readmePath - Value ($templateInstructions + $readmeContent )
54+ } else {
55+ Write-Host " [$timestamp ] Creating new README..."
56+ $templateInstructions = " # Clean Architecture Full-Stack Template`n`n "
57+ $templateInstructions += " ## How to use this template`n`n "
58+ $templateInstructions += " ```` n"
59+ $templateInstructions += " dotnet new cleanarch-fullstack --Organization YourCompany --ProjectName YourProductName`n "
60+ $templateInstructions += " ```` n`n "
61+
62+ Set-Content - Path $readmePath - Value $templateInstructions
63+ }
64+
3965# Create template structure directories
4066$templateConfigDir = Join-Path $OutputDirectory " .template.config"
4167New-Item - Path $templateConfigDir - ItemType Directory - Force | Out-Null
0 commit comments