-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
/
Copy pathStart-CippDevEmulators.ps1
18 lines (13 loc) · 1.08 KB
/
Start-CippDevEmulators.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Get-Command wt -ErrorAction Stop | Out-Null
Get-Process node -ErrorAction SilentlyContinue | Stop-Process -ErrorAction SilentlyContinue
$Path = (Get-Item $PSScriptRoot).Parent.Parent.FullName
pwsh -file (Join-Path $PSScriptRoot 'Start-CippDevInstallation.ps1')
Write-Host 'Starting CIPP Dev Emulators'
if (Test-Path (Join-Path $Path 'CIPP-API-Processor')) {
$Process = Read-Host -Prompt 'Start Process Function (y/N)?'
}
if ($Process -eq 'y') {
wt --title CIPP`; new-tab --title 'Azurite' -d $Path pwsh -c azurite`; new-tab --title 'FunctionApp' -d $Path\CIPP-API pwsh -c func start`; new-tab --title 'CIPP Frontend' -d $Path\CIPP pwsh -c npm run dev`; new-tab --title 'SWA' -d $Path\CIPP pwsh -c npm run start-swa`; new-tab --title 'CIPP-API-Processor' -d $Path\CIPP-API-Processor pwsh -c func start --port 7072
} else {
wt --title CIPP`; new-tab --title 'Azurite' -d $Path pwsh -c azurite`; new-tab --title 'FunctionApp' -d $Path\CIPP-API pwsh -c func start`; new-tab --title 'CIPP Frontend' -d $Path\CIPP pwsh -c npm run dev`; new-tab --title 'SWA' -d $Path\CIPP pwsh -c npm run start-swa
}