forked from spinsirr/order-wizard
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
83 lines (67 loc) · 2.01 KB
/
Copy pathjustfile
File metadata and controls
83 lines (67 loc) · 2.01 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
# List available commands
default:
@just --list
alias ci := check
# Run all dev servers (MongoDB + extension + server)
dev: db
#!/usr/bin/env bash
trap 'kill 0' EXIT SIGINT SIGTERM
(cd apps/extension && bun run dev) &
(cd apps/server && cargo watch -x run) &
wait
# Stop all dev processes
stop:
-pkill -f "target/debug/server"
-pkill -f "wxt"
-lsof -ti:3000 | xargs -r kill -9
-lsof -ti:5173 | xargs -r kill -9
# Build everything
build:
cd apps/extension && bun run build
cd apps/server && cargo build --release
rm -rf /mnt/c/order-wizard-ext
cp -r apps/extension/.output/chrome-mv3 /mnt/c/order-wizard-ext
# Run all checks (typecheck + lint + test + clippy)
check:
cd apps/extension && bun run typecheck
cd apps/extension && bun run lint
cd apps/extension && bun run test
cd apps/server && cargo clippy
# Run extension unit tests
test:
cd apps/extension && bun run test
# TypeScript type check
typecheck:
cd apps/extension && bun run typecheck
# Lint extension code
lint:
cd apps/extension && bun run lint
# Lint and auto-fix
lint-fix:
cd apps/extension && bun run lint:fix
# Format code
format:
cd apps/extension && bun run format
# Start MongoDB
db:
docker-compose up -d mongodb
# Stop MongoDB
db-stop:
docker-compose down
# Clean all build artifacts
clean:
cd apps/extension && bun run clean
cd apps/server && cargo clean
# Install dependencies
install:
cd apps/extension && bun install
# Bump version across all packages (single source of truth: root package.json)
bump version:
jq --arg v "{{version}}" '.version = $v' package.json > tmp.json && mv tmp.json package.json
jq --arg v "{{version}}" '.version = $v' apps/extension/package.json > tmp.json && mv tmp.json apps/extension/package.json
sed -i '' 's/^version = ".*"/version = "{{version}}"/' apps/server/Cargo.toml
@echo "Bumped all packages to {{version}}"
# Setup git hooks
setup:
git config core.hooksPath .githooks
@echo "Git hooks configured"