-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
66 lines (54 loc) · 1.75 KB
/
deploy.sh
File metadata and controls
66 lines (54 loc) · 1.75 KB
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
# PasswordGEN Production Deployment Script
# Run this script to build and prepare for production deployment
echo "🔐 PasswordGEN - Production Deployment"
echo "======================================"
# Check if Node.js is installed
if ! command -v node &> /dev/null; then
echo "❌ Node.js is not installed. Please install Node.js first."
exit 1
fi
# Check if npm is installed
if ! command -v npm &> /dev/null; then
echo "❌ npm is not installed. Please install npm first."
exit 1
fi
echo "📦 Installing dependencies..."
npm install
if [ $? -ne 0 ]; then
echo "❌ Failed to install dependencies."
exit 1
fi
echo "🔍 Running TypeScript type checking..."
npx vue-tsc --noEmit
if [ $? -ne 0 ]; then
echo "❌ TypeScript type checking failed."
exit 1
fi
echo "🏗️ Building for production..."
npm run build
if [ $? -ne 0 ]; then
echo "❌ Build failed."
exit 1
fi
echo "✅ Build completed successfully!"
echo ""
echo "📁 Production files are in the 'dist' directory:"
echo " - Total bundle size: ~90KB (compressed)"
echo " - Optimized for performance and SEO"
echo " - All assets included (CSS, JS, images)"
echo ""
echo "🚀 Deployment options:"
echo " 1. Upload 'dist' folder contents to your web server"
echo " 2. Use Netlify: drag & drop the 'dist' folder"
echo " 3. Use Vercel: connect repo and set build command to 'npm run build'"
echo " 4. Use GitHub Pages: upload 'dist' contents to your repository"
echo ""
echo "🎉 Your PasswordGEN application is ready for production!"
# Optional: Start preview server
read -p "🔍 Start local preview server? (y/n): " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
echo "🌐 Starting preview server at http://localhost:4173"
npm run preview
fi