-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkintsugi.nimble
More file actions
43 lines (35 loc) · 1.05 KB
/
Copy pathkintsugi.nimble
File metadata and controls
43 lines (35 loc) · 1.05 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
# Package
include "src/core/version"
version = VERSION
author = "Ray Perry"
description = "The Kintsugi Programming Language"
license = "MIT"
srcDir = "src"
bin = @["kintsugi"]
binDir = "bin"
# Dependencies
requires "nim >= 2.0.0"
proc buildCli() =
exec "nim c -d:release --outdir:bin src/kintsugi.nim"
proc buildWeb() =
exec "nim js -d:release --outdir:web src/kintsugi_js.nim"
# `bin` declaration means nimble's built-in `build` handles CLI and shadows any
# user-defined `task build`. Expose CLI and web as explicit tasks, plus `all`.
task cli, "Build CLI only":
buildCli()
task web, "Build web JS bundle":
buildWeb()
task all, "Build CLI + web":
buildCli()
buildWeb()
task test, "Run all tests":
var failed: seq[string] = @[]
for f in listFiles("tests"):
if f.endsWith(".nim") and f.startsWith("tests/test_") and f != "tests/debug.nim":
try:
exec "nim c -r --outdir:bin/tests " & f
except:
failed.add(f)
if failed.len > 0:
echo "FAILED: " & $failed
quit(1)