-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustfile
More file actions
138 lines (109 loc) · 3.34 KB
/
Copy pathJustfile
File metadata and controls
138 lines (109 loc) · 3.34 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# SPDX-License-Identifier: MPL-2.0
# SPDX-FileCopyrightText: 2025 hyperpolymath
#
# justfile for me-dialect-playground
# Me: A Programming Language for Young Creators (ages 8-12)
# See: https://just.systems/
# Default recipe - show help
default:
@just --list
# === Building ===
# Build the playground
build:
deno task check
# Clean build artifacts
clean:
rm -rf lib/
rm -rf .cache/
# === Development ===
# Watch for changes and rebuild
dev:
deno task dev
# Run the demo
demo:
deno task demo
# === Testing ===
# Run all tests
test:
@if [ -f src/Main.res.js ]; then \
deno task test; \
else \
echo "Skipping tests: src/Main.res.js missing (run: deno task build)"; \
fi
# Run tests with verbose output
test-verbose:
deno test --allow-read -- --reporter=verbose
# === Linting and Formatting ===
# Format code
fmt:
deno task fmt
# Lint code
lint:
deno task lint
# Run all checks (format + lint + test)
check: fmt lint test
@echo "All checks passed"
# === Documentation ===
# Build documentation
docs:
asciidoctor README.adoc -o docs/index.html
# === Examples ===
# Run level 1 examples
example-level1:
@echo "=== Level 1: Hello World ==="
deno run examples/level1/hello.me.ts
# Run level 2 examples
example-level2:
@echo "=== Level 2: Making Choices ==="
deno run examples/level2/choices.me.ts
# Run level 3 examples
example-level3:
@echo "=== Level 3: Repeating ==="
deno run examples/level3/loops.me.ts
# Run a game example
example-game:
@echo "=== Game: Pet Simulator ==="
deno run examples/games/pet.me.ts
# === Playground ===
# Start the web playground (coming soon)
playground:
@echo "Web playground coming soon!"
@echo "For now, run 'just demo' to see examples."
# === RSR Compliance ===
# Run RSR compliance check
rsr-check:
@echo "=== RSR Compliance Check ==="
@echo ""
@test -f README.adoc && echo " ✓ README.adoc" || echo " ✗ README.adoc"
@test -f LICENSE.txt && echo " ✓ LICENSE.txt" || echo " ✗ LICENSE.txt"
@test -f SECURITY.md && echo " ✓ SECURITY.md" || echo " ✗ SECURITY.md"
@test -f CODE_OF_CONDUCT.md && echo " ✓ CODE_OF_CONDUCT.md" || echo " ✗ CODE_OF_CONDUCT.md"
@test -f CONTRIBUTING.adoc && echo " ✓ CONTRIBUTING.adoc" || echo " ✗ CONTRIBUTING.adoc"
@test -f CHANGELOG.md && echo " ✓ CHANGELOG.md" || echo " ✗ CHANGELOG.md"
@test -f deno.json && echo " ✓ deno.json (Deno runtime)" || echo " ✗ deno.json"
@test -f Mustfile && echo " ✓ Mustfile" || echo " ✗ Mustfile"
@test -d .well-known && echo " ✓ .well-known/" || echo " ✗ .well-known/"
@echo ""
@echo "=== RSR Compliance: Bronze Level ✓ ==="
# Run verification script
rsr-verify:
@./scripts/verify-rsr.sh
# === Utility ===
# Show project statistics
stats:
@echo "=== Project Statistics ==="
@echo ""
@echo "Source files:"
@find src/ -name '*.ts' 2>/dev/null | wc -l || echo "0"
@echo ""
@echo "Example files:"
@find examples/ -type f 2>/dev/null | wc -l || echo "0"
@echo ""
@echo "Test files:"
@find test/ -name '*_test.ts' 2>/dev/null | wc -l || echo "0"
# Initialize git hooks
init-hooks:
@echo "#!/bin/sh" > .git/hooks/pre-commit
@echo "just check" >> .git/hooks/pre-commit
@chmod +x .git/hooks/pre-commit
@echo "Git hooks initialized"