param( [string]$OutputPath = '' ) $sourcePath = Join-Path $PSScriptRoot 'classic' $resolvedOutputPath = if ([string]::IsNullOrWhiteSpace($OutputPath)) { Join-Path $sourcePath 'dist' } else { $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($OutputPath) } if (-not (Test-Path -LiteralPath $resolvedOutputPath)) { New-Item -ItemType Directory -Path $resolvedOutputPath -Force | Out-Null } $files = @( 'megamenu-classic.css', 'megamenu-services-standalone.js', 'megamenu-classic.js', 'classic-deployment.md' ) foreach ($file in $files) { $source = Join-Path $sourcePath $file if (-not (Test-Path -LiteralPath $source)) { throw ('Classic-Datei fehlt: ' + $source) } Copy-Item -LiteralPath $source -Destination (Join-Path $resolvedOutputPath $file) -Force Write-Host ('Kopiert: ' + $file) -ForegroundColor Green } Write-Host ('Classic-Paket erstellt: ' + $resolvedOutputPath) -ForegroundColor Green