Multi-Domain-Asset-Infrastruktur: geteilte Vite-Konfiguration und DomainAssetContext
- vite.shared.js als gemeinsame Quelle fuer Ports, Hot-Files, HMR-Hosts und CORS-Origins der beiden Vite-Builds (Portal/Web) - App\Support\DomainAssetContext kapselt die Vite-Build-Directory- Konfiguration pro Domain (ThemeServiceProvider + Auth-Layout nutzen ihn) - Tailwind-Portal-Content-Globs auf die tatsaechliche View-Struktur gezogen - Dev-Beispiel-Routen + Tests (DomainAssetContextTest, DevExampleRoutesTest) - Aufraeumen: versehentliche Leerdatei dev:web entfernt Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
4bb9094207
commit
0efabaf446
15 changed files with 485 additions and 109 deletions
|
|
@ -16,4 +16,23 @@ enum Portal: string
|
|||
self::Both => 'Beide Portale',
|
||||
};
|
||||
}
|
||||
|
||||
public function abbreviation(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::Presseecho => 'PE',
|
||||
self::Businessportal24 => 'B24',
|
||||
self::Both => 'PE+B24',
|
||||
};
|
||||
}
|
||||
|
||||
public static function stripTrailingAbbreviation(string $value): string
|
||||
{
|
||||
$abbreviations = implode('|', array_map(
|
||||
fn (self $portal): string => preg_quote($portal->abbreviation(), '/'),
|
||||
self::cases(),
|
||||
));
|
||||
|
||||
return trim((string) preg_replace('/\s*\(('.$abbreviations.')\)\s*$/u', '', $value));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue