param() $ErrorActionPreference = 'Stop' $repoRoot = Resolve-Path "$PSScriptRoot/../.." $ihmDist = Join-Path $repoRoot 'ihm_client/dist' $targetAssets = Join-Path (Resolve-Path "$PSScriptRoot/..") 'assets/ihm' $targetWeb = Join-Path (Resolve-Path "$PSScriptRoot/..") 'web/ihm' if (!(Test-Path $ihmDist)) { Write-Error "Le build d'ihm_client est introuvable: $ihmDist" } New-Item -ItemType Directory -Force -Path $targetAssets | Out-Null Remove-Item -Recurse -Force -ErrorAction SilentlyContinue (Join-Path $targetAssets '*') | Out-Null Copy-Item -Recurse -Force "$ihmDist/*" $targetAssets Write-Host "Copie terminée: $ihmDist -> $targetAssets" New-Item -ItemType Directory -Force -Path $targetWeb | Out-Null Remove-Item -Recurse -Force -ErrorAction SilentlyContinue (Join-Path $targetWeb '*') | Out-Null Copy-Item -Recurse -Force "$ihmDist/*" $targetWeb Write-Host "Copie terminée: $ihmDist -> $targetWeb"