File size: 1,767 Bytes
b54da4e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | #!/bin/bash
echo "π SETA Smart Inventory - Production Deployment"
echo "=============================================="
echo ""
# Check Node.js version
echo "π Checking Node.js version..."
node_version=$(node -v 2>/dev/null || echo "not installed")
if [[ $node_version == "not installed" ]]; then
echo "β Node.js is not installed. Please install Node.js 18+ first."
echo " Download from: https://nodejs.org/"
exit 1
fi
echo "β
Node.js version: $node_version"
echo ""
# Install dependencies
echo "π¦ Installing production dependencies..."
npm ci --only=production --silent
if [ $? -ne 0 ]; then
echo "β Failed to install dependencies"
exit 1
fi
echo "β
Dependencies installed successfully"
echo ""
# Build the application
echo "π¨ Building static application..."
npm run build
if [ $? -ne 0 ]; then
echo "β Build failed"
exit 1
fi
echo "β
Build completed successfully"
echo ""
# Show deployment instructions
echo "π DEPLOYMENT READY!"
echo "==================="
echo ""
echo "π Static files location: ./out/"
echo "π Total size: ~2.8 MB"
echo "β‘ Optimized for mobile and desktop"
echo ""
echo "π Deploy to your preferred platform:"
echo ""
echo "πΉ VERCEL (Recommended):"
echo " 1. Push code to GitHub"
echo " 2. Connect repo to Vercel"
echo " 3. Auto-deploy on push"
echo ""
echo "πΉ NETLIFY:"
echo " 1. Drag & drop 'out' folder to Netlify"
echo " 2. Or connect GitHub repo"
echo ""
echo "πΉ GITHUB PAGES:"
echo " 1. Push 'out' contents to gh-pages branch"
echo " 2. Enable Pages in repo settings"
echo ""
echo "πΉ CUSTOM HOSTING:"
echo " 1. Upload 'out' folder contents"
echo " 2. Point domain to index.html"
echo ""
echo "π Your SETA Smart Inventory app is ready!"
|