-
Notifications
You must be signed in to change notification settings - Fork 1
/
init.ps1
23 lines (18 loc) · 1.08 KB
/
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
$applicationName = "SPEAK3Application";
$applicationTitle = "Hello SPEAK3!";
$instanceWebRoot = "C:\\inetpub\\wwwroot\\scMityaTest93.local";
$instanceHost = "https://scmityatest93.local"
Write-Host "Updating Speak3 Start template"
$packageJson = Join-Path $PSScriptRoot "package.json"
$indexHtml = Join-Path $PSScriptRoot "src\index.html"
$appComponent = Join-Path $PSScriptRoot "src\app\app.component.html"
$packageJsonContent = Get-Content $packageJson
$packageJsonContent.Replace("{applicationName}",$applicationName) | Set-Content $packageJson
$packageJsonContent = Get-Content $packageJson
$packageJsonContent.Replace("{instanceWebRoot}",$instanceWebRoot) | Set-Content $packageJson
$packageJsonContent = Get-Content $packageJson
$packageJsonContent.Replace("{instanceHost}",$instanceHost) | Set-Content $packageJson
$indexHtmlContent = Get-Content $indexHtml
$indexHtmlContent.Replace("{applicationTitle}", $applicationTitle) | Set-Content $indexHtml
$appComponentContent = Get-Content $appComponent
$appComponentContent.Replace("{applicationTitle}", $applicationTitle) | Set-Content $appComponent