-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·36 lines (28 loc) · 1004 Bytes
/
setup.sh
File metadata and controls
executable file
·36 lines (28 loc) · 1004 Bytes
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
#!/bin/bash
set -e
# Colors for output
GREEN='\033[0;32m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
echo -e "${BLUE}🚀 Starting setup for rockoder.com...${NC}"
# 1. Install Node.js dependencies
echo -e "${BLUE}📦 Installing Node.js dependencies with pnpm...${NC}"
pnpm install
# 2. Install Python dependencies
if [ -f "scripts/requirements_hn.txt" ]; then
echo -e "${BLUE}🐍 Installing Python dependencies...${NC}"
pip install -r scripts/requirements_hn.txt
else
echo -e "${BLUE}⚠️ scripts/requirements_hn.txt not found, skipping Python deps.${NC}"
fi
# 3. Install Playwright browsers
echo -e "${BLUE}🎭 Installing Playwright browsers...${NC}"
npx playwright install --with-deps chromium
# 4. Build the site
echo -e "${BLUE}🏗️ Building the site...${NC}"
pnpm build
# 5. Take a snapshot
echo -e "${BLUE}📸 Taking a snapshot...${NC}"
mkdir -p screenshots
pnpm test:visual
echo -e "${GREEN}✅ Setup complete! Homepage snapshot saved to screenshots/homepage.png${NC}"