Skip to content

Commit 9dd962a

Browse files
committed
Enhance cleaning script to remove the correct ts files
1 parent c6c5c6a commit 9dd962a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/clean-typescript-ccs-files.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ $folderToCleanPath = Join-Path $targetDirectory -ChildPath $folderToClean
1616
if (Test-Path $folderToCleanPath) {
1717
Write-Host "Cleaning contents in: $folderToClean" -ForegroundColor Cyan
1818
Push-Location $folderToCleanPath
19+
# Clean directories
1920
Get-ChildItem -Directory | ForEach-Object { Remove-Item -r $_.FullName }
21+
# Clean TypeScript files except index.ts and *ServiceClient.ts
22+
Remove-Item *.ts -Exclude "index.ts", "*ServiceClient.ts"
23+
# Remove kiota lock file
2024
Remove-Item $kiotaLockFileName -ErrorAction SilentlyContinue -Verbose
2125
Pop-Location
2226
Write-Host "Successfully cleaned contents in: $folderToClean" -ForegroundColor Green
@@ -25,4 +29,4 @@ if (Test-Path $folderToCleanPath) {
2529
}
2630

2731
Pop-Location
28-
Write-Host "Cleaning operation completed for target: $folderToClean derived from package: $packageName" -ForegroundColor Green
32+
Write-Host "Cleaning operation completed for target: $folderToClean derived from package: $packageName" -ForegroundColor Green

0 commit comments

Comments
 (0)