-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustfile
More file actions
95 lines (81 loc) · 2.77 KB
/
Justfile
File metadata and controls
95 lines (81 loc) · 2.77 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# Default recipe to display help
default:
@just --list
# Check project status
status:
@echo "🔍 Project Status:"
@echo "Branch: $(git branch --show-current)"
@echo "Last commit: $(git log -1 --oneline)"
@echo "Site files: $(find site -name '*.html' | wc -l) HTML files"
@echo "Content files: $(find contents -name '*.typ' | wc -l) Typst files"
# Clean build artifacts
clean:
@echo "🧹 Cleaning build artifacts..."
rm -rf site/.search_index
rm -f site/search-index.json
# Build the site (placeholder - adjust based on your build tool)
build:
@echo "🔨 Building site..."
@echo "Note: Update this command based on your static site generator"
@ls -la site/
# Serve the site locally for development
serve:
@echo "🚀 Starting local development server..."
cd site && python3 -m http.server 8000
# Deploy dry run - validate configuration
deploy-check:
@echo "🔍 Validating deployment configuration..."
bunx wrangler deploy --dry-run
# Deploy to Cloudflare Workers
deploy:
@echo "🚀 Deploying to Cloudflare Workers..."
bunx wrangler deploy
# Deploy with preview
deploy-preview:
@echo "🔍 Creating preview deployment..."
bunx wrangler deploy --env preview
# Watch for changes and rebuild (requires a build tool)
watch:
@echo "👀 Watching for changes..."
@echo "Note: Implement file watching based on your build tool"
# Git shortcuts
git-status:
@git status --short
git-add-all:
@git add .
@git status --short
# Install dependencies
install:
@echo "📦 Installing dependencies..."
@if command -v bun >/dev/null 2>&1; then \
bun install; \
elif command -v npm >/dev/null 2>&1; then \
npm install; \
else \
echo "No package manager found (bun/npm)"; \
fi
# Setup project for first time
setup:
@echo "🎯 Setting up project..."
just install
just check-tools
@echo "✅ Setup complete!"
# Check tools and dependencies
check-tools:
@echo "🔧 Checking required tools..."
@command -v git >/dev/null 2>&1 && echo "✅ git" || echo "❌ git not found"
@command -v just >/dev/null 2>&1 && echo "✅ just" || echo "❌ just not found"
@command -v bunx >/dev/null 2>&1 && echo "✅ bun/bunx" || echo "❌ bun/bunx not found"
@command -v wrangler >/dev/null 2>&1 && echo "✅ wrangler" || echo "❌ wrangler not found (will use bunx)"
@command -v python3 >/dev/null 2>&1 && echo "✅ python3" || echo "❌ python3 not found"
# Show project info
info:
@echo "📊 Project Information:"
@echo "Name: india-hacker"
@echo "Type: Static site"
@echo "Deploy: Cloudflare Workers"
@echo "Content: Typst files in contents/"
@echo "Output: HTML files in site/"
@echo ""
@echo "Available commands:"
@just --list