forked from indice-co/Indice.Platform
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclear-ecmascript.ps1
More file actions
31 lines (28 loc) · 917 Bytes
/
Copy pathclear-ecmascript.ps1
File metadata and controls
31 lines (28 loc) · 917 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
$distFolders = @(
"src\Indice.Features.Cases.App\dist",
"src\Indice.Features.Identity.AdminUI.App\dist",
"src\Indice.Features.Messages.App\dist",
"src\Indice.Features.Risk.App\dist",
"src\Indice.Features.Cases.App\node_modules",
"src\Indice.Features.Identity.AdminUI.App\node_modules",
"src\Indice.Features.Messages.App\node_modules",
"src\Indice.Features.Risk.App\node_modules"
)
function DeleteFolder {
param (
[string]$folderPath
)
if (Test-Path $folderPath) {
try {
Remove-Item -Path $folderPath -Recurse -Force
Write-Output "Folder '$folderPath' and all contents deleted successfully."
} catch {
Write-Error "Error deleting folder '$folderPath': $_"
}
} else {
Write-Output "Folder '$folderPath' does not exist."
}
}
foreach ($x in $distFolders) {
DeleteFolder -folderPath $x
}