-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·80 lines (71 loc) · 2.09 KB
/
build.sh
File metadata and controls
executable file
·80 lines (71 loc) · 2.09 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/bin/bash
# Master Build Script
# Builds optimized CSS and JavaScript for production deployment
echo "========================================="
echo " SAVIGN Website - Production Build"
echo "========================================="
echo ""
# Check if we're in the right directory
if [ ! -f "index.html" ]; then
echo "Error: index.html not found. Please run this script from the project root."
exit 1
fi
# Build CSS
echo "Step 1: Building CSS..."
echo "---------------------------------------"
if [ -f "build-css.sh" ]; then
chmod +x build-css.sh
./build-css.sh
else
echo "Warning: build-css.sh not found, skipping CSS build"
fi
echo ""
echo "Step 2: Building JavaScript..."
echo "---------------------------------------"
if [ -f "build-js.sh" ]; then
chmod +x build-js.sh
./build-js.sh
else
echo "Warning: build-js.sh not found, skipping JavaScript build"
fi
echo ""
echo "========================================="
echo " Build Summary"
echo "========================================="
echo ""
# Show file sizes
echo "CSS Files:"
if [ -d "css/dist" ]; then
du -h css/dist/*.css 2>/dev/null | sort -h
else
echo " No CSS dist files found"
fi
echo ""
echo "JavaScript Files:"
if [ -d "js/dist" ]; then
du -h js/dist/*.js 2>/dev/null | sort -h
else
echo " No JavaScript dist files found"
fi
echo ""
echo "========================================="
echo " Deployment Instructions"
echo "========================================="
echo ""
echo "1. Use index.prod.html for production deployment"
echo " (or update index.html to use minified files)"
echo ""
echo "2. Ensure all files in css/dist/ and js/dist/ are deployed"
echo ""
echo "3. Test the production build locally:"
echo " python3 -m http.server 8000"
echo " Then visit: http://localhost:8000/index.prod.html"
echo ""
echo "4. For GitHub Pages deployment:"
echo " - Commit all files including dist/ directories"
echo " - Push to main branch"
echo " - Enable GitHub Pages in repository settings"
echo ""
echo "========================================="
echo " Build Complete!"
echo "========================================="