-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathJustfile
More file actions
93 lines (76 loc) · 2.57 KB
/
Copy pathJustfile
File metadata and controls
93 lines (76 loc) · 2.57 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
# Cleanup all build artifacts and node_modules across the monorepo
# Default: show available recipes
default:
@just --list
# Full clean: node_modules, .turbo, .next, lockfiles everywhere
clean:
#!/usr/bin/env bash
set -euo pipefail
ROOT="{{ source_file() }}"
ROOT="$(dirname "$ROOT")"
echo "Cleaning $ROOT ..."
find "$ROOT" -name "node_modules" -type d -exec rm -rf {} + 2>/dev/null || true
find "$ROOT" -name ".turbo" -type d -exec rm -rf {} + 2>/dev/null || true
find "$ROOT" -name ".next" -type d -exec rm -rf {} + 2>/dev/null || true
find "$ROOT" -name "dist" -type d -not -path "*/.git/*" -exec rm -rf {} + 2>/dev/null || true
rm -f "$ROOT/bun.lock" "$ROOT/bun.lockb"
echo "Done. All artifacts removed."
# Just node_modules
clean-modules:
#!/usr/bin/env bash
ROOT="{{ source_file() }}"
ROOT="$(dirname "$ROOT")"
find "$ROOT" -name "node_modules" -type d -exec rm -rf {} + 2>/dev/null || true
echo "node_modules removed."
# Just build caches (.turbo, .next, dist)
clean-cache:
#!/usr/bin/env bash
ROOT="{{ source_file() }}"
ROOT="$(dirname "$ROOT")"
find "$ROOT" -name ".turbo" -type d -exec rm -rf {} + 2>/dev/null || true
find "$ROOT" -name ".next" -type d -exec rm -rf {} + 2>/dev/null || true
find "$ROOT" -name "dist" -type d -not -path "*/.git/*" -exec rm -rf {} + 2>/dev/null || true
echo "Build caches removed."
# Clean and reinstall
reinstall: clean
bun install
# Install and build everything
setup: reinstall
bun run build
# Lint and format (oxlint --deny-warnings + oxfmt --write)
check:
bun run check
# Same lint bar as `check`, but reports instead of writing (CI)
check-ci:
bunx oxlint --deny-warnings --format github
bunx oxfmt --check
# Typecheck all packages with tsgo
types:
bun run check-types
# Harness geometry tests
test:
cd packages/harness && bun test
# Start web dev server
web:
bun run dev:web
# Start API server
server:
bun run dev:server
# Generate a migration from schema changes: just db-generate add_foo
db-generate name="":
#!/usr/bin/env bash
set -euo pipefail
cd packages/db
if [ -n "{{ name }}" ]; then
bun run db:generate --name="{{ name }}"
else
bun run db:generate
fi
# Apply pending migrations
db-migrate:
cd packages/db && bun run db:migrate
# Apply plan limits from packages/db/src/seed.ts (`just db-seed --dry-run` to preview)
db-seed *args:
cd packages/db && bun run db:seed -- {{ args }}
# Bring a database up to date: migrate, then seed. Order matters.
db-setup: db-migrate db-seed