revert npm changes
This commit is contained in:
@@ -18,8 +18,8 @@ if ($Help) {
|
||||
Write-Host " -Help Show this help message" -ForegroundColor White
|
||||
Write-Host ""
|
||||
Write-Host "NPM Registry:" -ForegroundColor Yellow
|
||||
Write-Host " Create frontend/.npmrc to configure custom npm registry" -ForegroundColor White
|
||||
Write-Host " The Docker build will use this file if present" -ForegroundColor White
|
||||
Write-Host " Uses your machine's npm configuration automatically" -ForegroundColor White
|
||||
Write-Host " npm install runs on host before Docker build" -ForegroundColor White
|
||||
Write-Host ""
|
||||
Write-Host "Brings up the complete stack: database, backend API, and frontend" -ForegroundColor Green
|
||||
Write-Host ""
|
||||
@@ -31,24 +31,19 @@ Write-Host "Obsidian - Quick Start" -ForegroundColor Cyan
|
||||
Write-Host "=========================================" -ForegroundColor Cyan
|
||||
Write-Host ""
|
||||
|
||||
# Copy user's .npmrc to frontend directory if it exists and frontend/.npmrc doesn't
|
||||
# Copy user's .npmrc to frontend directory if it exists
|
||||
$UserNpmrc = Join-Path $env:USERPROFILE ".npmrc"
|
||||
$FrontendNpmrc = "frontend\.npmrc"
|
||||
|
||||
if (Test-Path $UserNpmrc) {
|
||||
if (-not (Test-Path $FrontendNpmrc)) {
|
||||
Write-Host "[INFO] Copying npm registry config from $UserNpmrc" -ForegroundColor Yellow
|
||||
Copy-Item $UserNpmrc $FrontendNpmrc
|
||||
Write-Host "[OK] Using custom npm registry configuration" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "[OK] Using existing frontend\.npmrc" -ForegroundColor Green
|
||||
}
|
||||
Write-Host "Copying npm registry config for Docker build..." -ForegroundColor Yellow
|
||||
Copy-Item $UserNpmrc $FrontendNpmrc -Force
|
||||
Write-Host "[OK] Using custom npm registry configuration" -ForegroundColor Green
|
||||
} else {
|
||||
if (Test-Path $FrontendNpmrc) {
|
||||
Write-Host "[OK] Using frontend\.npmrc" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "[INFO] Using default npm registry (no .npmrc found)" -ForegroundColor Yellow
|
||||
Remove-Item $FrontendNpmrc -Force
|
||||
}
|
||||
Write-Host "[INFO] Using default npm registry" -ForegroundColor Yellow
|
||||
}
|
||||
Write-Host ""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user