-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCleanUpSolution.ps1
18 lines (10 loc) · 966 Bytes
/
CleanUpSolution.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$projectpath = $PSScriptRoot
Write-Host "Deleting obj folders in " + $projectpath -ForegroundColor Green
Get-ChildItem -Directory -Recurse -Path $projectpath | where {$_.Name -eq "obj" -and $_.FullName -notmatch "node_modules" } | Get-ChildItem | Remove-Item -Recurse -Force
Write-Host "Deleting bin folders in " + $projectpath -ForegroundColor Green
Get-ChildItem -Directory -Recurse -Path $projectpath | where {$_.Name -eq "bin" -and $_.FullName -notmatch "node_modules" } | Get-ChildItem | Remove-Item -Recurse -Force
Write-Host "Deleting packages in " + $projectpath -ForegroundColor Green
Get-ChildItem -Directory -Recurse -Path $projectpath | where {$_.Name -eq "packages" -and $_.FullName -notmatch "node_modules" } | Get-ChildItem | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue
Write-Host "Sucessfull" -ForegroundColor Green
Write-Host "Press any key to continue bro..."
$x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")