# PowerShell script to migrate files to src directory # Run this script: .\migrate-files.ps1 Write-Host "Starting file migration to src directory..." -ForegroundColor Green # Check if src directory exists if (-not (Test-Path "src")) { Write-Host "Creating src directory..." -ForegroundColor Yellow New-Item -ItemType Directory -Path "src" -Force | Out-Null } # Function to move files with checks function Move-WithCheck { param($Source, $Destination) if (Test-Path $Source) { Write-Host "Moving $Source to $Destination..." -ForegroundColor Cyan Move-Item -Path $Source -Destination $Destination -Force Write-Host "Moved $Source" -ForegroundColor Green } else { Write-Host "$Source not found, skipping..." -ForegroundColor Yellow } } # Move App.tsx if (Test-Path "App.tsx") { Move-WithCheck "App.tsx" "src\App.tsx" } # Move components directory if (Test-Path "components") { Move-WithCheck "components" "src\components" } # Move utils directory if (Test-Path "utils") { Move-WithCheck "utils" "src\utils" } # Move styles directory if (Test-Path "styles") { Move-WithCheck "styles" "src\styles" } Write-Host "" Write-Host "Migration complete!" -ForegroundColor Green Write-Host "" Write-Host "Next steps:" -ForegroundColor Yellow Write-Host "1. Update imports in src/App.tsx to use '@/' aliases" -ForegroundColor White Write-Host "2. Fix the sonner import: import { toast } from 'sonner';" -ForegroundColor White Write-Host "3. Run: npm run dev" -ForegroundColor White Write-Host "" Write-Host "See MIGRATION_GUIDE.md for detailed instructions" -ForegroundColor Cyan