-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.mise.toml
More file actions
77 lines (63 loc) · 2.01 KB
/
.mise.toml
File metadata and controls
77 lines (63 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
# Not needed when using Nix (flake.nix). Uncomment for non-Nix environments.
# [tools]
# ruby = "4.0"
# bun = "1.3"
[tasks.dev]
depends = ["dev-db", "dev-backend", "dev-frontend"]
description = "Start DB, backend, and frontend"
[tasks.dev-db]
run = """
docker start wordle-db 2>/dev/null || \
docker run -d --name wordle-db \
-e POSTGRES_PASSWORD=postgres \
-e POSTGRES_DB=wordle \
-p 5432:5432 \
postgres:16
echo "Waiting for PostgreSQL..."
until docker exec wordle-db pg_isready -U postgres > /dev/null 2>&1; do sleep 0.5; done
echo "PostgreSQL is ready"
"""
description = "Start PostgreSQL container"
[tasks.setup]
run = """
cd backend && bundle install
cd ../frontend && bun install
"""
description = "Install backend and frontend dependencies"
[tasks.db-setup]
run = """
cd backend && bundle exec rails db:create 2>/dev/null; bundle exec rails db:migrate && bundle exec rails db:seed
"""
depends = ["dev-db"]
description = "Run migrations and seed data"
[tasks.dev-backend]
run = "cd backend && bundle exec rails db:prepare && bundle exec rails server -p 8080"
depends = ["dev-db"]
description = "Start Rails backend"
[tasks.dev-frontend]
run = "cd frontend && bun run dev"
description = "Start React Router dev server"
[tasks.build-backend]
run = "cd backend && bundle exec rails zeitwerk:check"
description = "Check Rails backend autoloading"
[tasks.build-frontend]
run = "cd frontend && bun run build"
description = "Build React Router frontend"
[tasks.lint-backend]
run = "cd backend && bundle exec standardrb"
description = "Lint Ruby backend"
[tasks.lint-frontend]
run = "cd frontend && bunx biome check ."
description = "Lint frontend"
[tasks.lint]
depends = ["lint-backend", "lint-frontend"]
description = "Lint all"
[tasks.format-backend]
run = "cd backend && bundle exec standardrb --fix"
description = "Format Ruby backend"
[tasks.format-frontend]
run = "cd frontend && bunx biome check --write ."
description = "Format frontend"
[tasks.format]
depends = ["format-backend", "format-frontend"]
description = "Format all"