-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathInit.ps1
30 lines (24 loc) · 899 Bytes
/
Init.ps1
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
function Start-Clients([string]$server = "localhost:54238", [switch]$endWebDev)
{
if ($endWebDev.IsPresent) { Kill-WebDev }
Invoke-Chrome "http://$server/#host"
Invoke-Chrome "http://$server/#host"
#Invoke-Chrome "http://$server/#join"
#Invoke-Chrome "http://$server/#join"
#Invoke-Chrome "http://$server/#join"
#Invoke-Chrome "http://$server/#view"
}
function Kill-WebDev
{
$processes = ps WebDev.WebServer40 -ErrorAction SilentlyContinue
if ($processes -ne $null) { $processes | stop-process }
}
function Invoke-Chrome([string]$url = "")
{
$arguments = @()
if($url -ne $null) { $arguments += $url }
Start-Process "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" -ArgumentList $arguments
}
Set-Alias -Name bs -Value Start-Clients -Option AllScope
Set-Alias -Name kwd -Value Kill-WebDev -Option AllScope
Set-Alias -Name chrome -Value Invoke-Chrome -Option AllScope