# PowerShell script to fix linear-gradient usage in .uvue files Write-Host "Starting linear-gradient fix process..." # Get all .uvue files in the pages directory $uvueFiles = Get-ChildItem -Path "pages" -Filter "*.uvue" -Recurse $fixedCount = 0 $totalFiles = 0 Write-Host "Found $($uvueFiles.Count) .uvue files to process." foreach ($file in $uvueFiles) { $totalFiles++ Write-Host "Processing: $($file.FullName)" try { $content = Get-Content $file.FullName -Raw -Encoding UTF8 if ($content -match 'background:\s*linear-gradient') { Write-Host "Fixing file: $($file.FullName)" -ForegroundColor Yellow # Replace all instances of "background: linear-gradient" with "background-image: linear-gradient" $newContent = $content -replace 'background:\s*linear-gradient', 'background-image: linear-gradient' # Write the updated content back to the file Set-Content -Path $file.FullName -Value $newContent -NoNewline -Encoding UTF8 $fixedCount++ Write-Host "Fixed: $($file.FullName)" -ForegroundColor Green } } catch { Write-Host "Error processing $($file.FullName): $($_.Exception.Message)" -ForegroundColor Red } } Write-Host "" Write-Host "=== Summary ===" -ForegroundColor Cyan Write-Host "Total .uvue files processed: $totalFiles" -ForegroundColor Cyan Write-Host "Files fixed: $fixedCount" -ForegroundColor Green Write-Host "Fix completed!" -ForegroundColor Green