Repository navigation
Expand file tree
/
Copy pathjustfile
More file actions
81 lines (62 loc) · 1.72 KB
/
Copy pathjustfile
File metadata and controls
81 lines (62 loc) · 1.72 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
#!/usr/bin/env just --justfile
# Using Just: https://github.com/casey/just?tab=readme-ov-file#installation
# List all of the available commands.
default:
just --list
# Run the CI checks
check:
bun i
# Lint the JS packages
bunx biome check
# Make sure Typescript compiles
bun run check
# Validate the quest tree
quest check
# Automatically fix some issues.
fix:
# Fix the JS packages
bun i
# Format and lint
bunx biome check --fix
# Run any CI tests
test:
# Run the JS tests via node.
bun test
# Render the social announcement cards (tools/cards/cards.ts) to PNG with the
# devshell's Playwright Chromium: `just cards` for all, `just cards <slug>...`
# for some, `--html` to keep the page for tweaking. Output lands in
# tools/cards/out/, which is ignored; the PNGs are posted, not committed.
cards *args:
bun i
bun tools/cards/render.ts {{args}}
# Upgrade any tooling
upgrade:
# Update the NPM dependencies
bun upgrade
bun outdated
# Build the packages
build mode="live":
bun i
bun astro build --mode {{mode}}
# The moq.pub and moq.watch player sites, which share these .env files.
bun vite build sites/pub --mode {{mode}}
bun vite build sites/watch --mode {{mode}}
# Deploy all three sites to Cloudflare.
deploy env="staging": (build env)
bun wrangler deploy --config sites/pub/wrangler.jsonc --env {{env}}
bun wrangler deploy --config sites/watch/wrangler.jsonc --env {{env}}
bun wrangler deploy --env {{env}}
dev:
bun i
# Run the web development server
bun astro dev --open
# Run the moq.pub development server on :5174.
dev-pub:
bun i
bun vite sites/pub --open
# Run the moq.watch development server on :5173.
dev-watch:
bun i
bun vite sites/watch --open
prod: (build "live")
bun astro preview --open