$ErrorActionPreference = 'Stop' $root = Split-Path -Parent $PSScriptRoot $tokens = $null $errors = $null [void][System.Management.Automation.Language.Parser]::ParseFile( (Join-Path $root 'deployment\Add-PortalSettingsPage.ps1'), [ref]$tokens, [ref]$errors ) if ($errors.Count -gt 0) { throw ('PowerShell-Syntaxfehler: ' + $errors[0].Message) } $jsonFiles = @( 'package.json', 'config\config.json', 'config\package-solution.json', 'config\serve.json', 'src\webparts\portalSettings\PortalSettingsWebPart.manifest.json' ) foreach ($relativePath in $jsonFiles) { Get-Content -Raw -LiteralPath (Join-Path $root $relativePath) | ConvertFrom-Json | Out-Null } Write-Host ("PortalSettings project validation passed: 1 PowerShell file and $($jsonFiles.Count) JSON files.")