Skip to content

Commit 05108ed

Browse files
committed
updated readme for app
1 parent 292293e commit 05108ed

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

template-src/CreateTemplate.ps1

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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"
4167
New-Item -Path $templateConfigDir -ItemType Directory -Force | Out-Null

0 commit comments

Comments
 (0)