- Introduced custom branding CSS styles in `custom-branding.css`. - Created example JSON configuration for custom branding in `custom-branding.example.json`. - Implemented branding configuration logic in `BrandingConfig.ts` to normalize and validate branding settings. - Developed CSS loader to manage loading and unloading of custom stylesheets in `BrandingCssLoader.ts`. - Added DOM rendering capabilities for branding elements in `BrandingDomRenderer.ts`. - Defined types and interfaces for branding elements and configurations in `BrandingTypes.ts`. - Included localization support for German in `de-de.js`. - Added unit tests for branding configuration, CSS loader, and DOM renderer. - Validated project structure and static assets with new validation scripts.
24 lines
830 B
PowerShell
24 lines
830 B
PowerShell
$ErrorActionPreference = 'Stop'
|
|
|
|
$root = Split-Path -Parent $PSScriptRoot
|
|
$files = @(
|
|
(Join-Path $root 'deployment\add-custombranding.ps1'),
|
|
(Join-Path $root 'build-classic.ps1')
|
|
)
|
|
|
|
foreach ($file in $files) {
|
|
$tokens = $null
|
|
$errors = $null
|
|
[void][System.Management.Automation.Language.Parser]::ParseFile($file, [ref]$tokens, [ref]$errors)
|
|
if ($errors.Count -gt 0) {
|
|
throw "PowerShell-Syntaxfehler in $file`: $($errors[0].Message)"
|
|
}
|
|
}
|
|
|
|
$localizationFiles = Get-ChildItem (Join-Path $root 'src\extensions\customBranding\loc') -Filter '*.js'
|
|
if ($localizationFiles.Count -lt 2) {
|
|
throw 'Deutsche und englische Lokalisierungsdateien werden erwartet.'
|
|
}
|
|
|
|
Write-Host "Projektvalidierung: $($files.Count) PowerShell- und $($localizationFiles.Count) Lokalisierungsdateien erfolgreich geprueft."
|