mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-12-21 13:31:30 -06:00
Modify Compile.ps1
Handling of Xaml to Improve Maintainability (#2701)
This commit is contained in:
parent
d3ef94f175
commit
00668755c9
10
Compile.ps1
10
Compile.ps1
@ -93,11 +93,17 @@ Get-ChildItem "config" | Where-Object {$psitem.extension -eq ".json"} | ForEach-
|
||||
$script_content.Add($(Write-output "`$sync.configs.$($psitem.BaseName) = '$json' `| convertfrom-json" ))
|
||||
}
|
||||
|
||||
$xaml = (Get-Content "xaml\inputXML.xaml").replace("'","''")
|
||||
# Read the entire XAML file as a single string, preserving line breaks
|
||||
$xaml = Get-Content "$workingdir\xaml\inputXML.xaml" -Raw
|
||||
|
||||
Update-Progress "Adding: Xaml " 90
|
||||
|
||||
$script_content.Add($(Write-output "`$inputXML = '$xaml'"))
|
||||
# Add the XAML content to $script_content using a here-string
|
||||
$script_content.Add(@"
|
||||
`$inputXML = @'
|
||||
$xaml
|
||||
'@
|
||||
"@)
|
||||
|
||||
$script_content.Add($(Get-Content "scripts\main.ps1"))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user