revert npm changes

This commit is contained in:
pratik
2025-10-15 16:15:03 -05:00
parent 2c7c5a1a97
commit cb6b867b58
5 changed files with 26 additions and 41 deletions

View File

@@ -41,8 +41,8 @@ while [[ $# -gt 0 ]]; do
echo " --help Show this help message"
echo ""
echo "NPM Registry:"
echo " Create frontend/.npmrc to configure custom npm registry"
echo " The Docker build will use this file if present"
echo " Uses your machine's npm configuration automatically"
echo " npm install runs on host before Docker build"
echo ""
echo "Brings up the complete stack: database, backend API, and frontend"
echo ""
@@ -56,24 +56,19 @@ while [[ $# -gt 0 ]]; do
esac
done
# 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
USER_NPMRC="${HOME}/.npmrc"
FRONTEND_NPMRC="frontend/.npmrc"
if [ -f "$USER_NPMRC" ]; then
if [ ! -f "$FRONTEND_NPMRC" ]; then
echo " Copying npm registry config from $USER_NPMRC"
cp "$USER_NPMRC" "$FRONTEND_NPMRC"
echo "✓ Using custom npm registry configuration"
else
echo "✓ Using existing frontend/.npmrc"
fi
echo "Copying npm registry config for Docker build..."
cp "$USER_NPMRC" "$FRONTEND_NPMRC"
echo "✓ Using custom npm registry configuration"
else
if [ -f "$FRONTEND_NPMRC" ]; then
echo "✓ Using frontend/.npmrc"
else
echo " Using default npm registry (no .npmrc found)"
rm -f "$FRONTEND_NPMRC"
fi
echo " Using default npm registry"
fi
echo ""