| #!/bin/bash |
|
|
| echo "π SETA Smart Inventory - Production Deployment" |
| echo "==============================================" |
| echo "" |
|
|
| |
| 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 "" |
|
|
| |
| 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 "" |
|
|
| |
| echo "π¨ Building static application..." |
| npm run build |
| if [ $? -ne 0 ]; then |
| echo "β Build failed" |
| exit 1 |
| fi |
| echo "β
Build completed successfully" |
| echo "" |
|
|
| |
| 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!" |
|
|