generated from openpeeps/pistachio
-
Notifications
You must be signed in to change notification settings - Fork 1
/
tim.nimble
executable file
·60 lines (47 loc) · 1.89 KB
/
tim.nimble
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
# Package
version = "0.1.3"
author = "OpenPeeps"
description = "A super fast template engine for cool kids!"
license = "LGPLv3"
srcDir = "src"
skipDirs = @["example", "editors", "bindings"]
installExt = @["nim"]
bin = @["tim"]
binDir = "bin"
# Dependencies
requires "nim >= 2.0.0"
requires "toktok#head"
requires "sorta"
requires "jsony"
requires "https://github.com/openpeeps/importer"
requires "watchout#head"
requires "kapsis#head"
requires "denim#head"
requires "checksums"
requires "flatty#head"
requires "nyml >= 0.1.8"
requires "urlly >= 1.1.1"
requires "semver >= 1.2.2"
requires "dotenv"
task node, "Build a NODE addon":
exec "denim build src/tim.nim --cmake --yes"
import std/os
task examples, "build all examples":
for e in walkDir(currentSourcePath().parentDir / "example"):
let x = e.path.splitFile
if x.name.startsWith("example_") and x.ext == ".nim":
exec "nim c -d:timHotCode --threads:on -d:watchoutBrowserSync --deepcopy:on --mm:arc -o:./bin/" & x.name & " example/" & x.name & x.ext
task example, "example httpbeast + tim":
exec "nim c -d:timHotCode -d:watchoutBrowserSync --deepcopy:on --threads:on --mm:arc -o:./bin/example_httpbeast example/example_httpbeast.nim"
task examplep, "example httpbeast + tim release":
exec "nim c -d:timStaticBundle -d:release --threads:on --mm:arc -o:./bin/example_httpbeast example/example_httpbeast.nim"
task bench, "run some benchmarks":
exec "nim c --threads:on -d:danger --opt:speed --mm:arc -o:./bin/bench example/benchmark.nim"
task dev, "build a dev cli":
exec "nimble build -f -d:timStandalone"
task prod, "build a prod cli":
exec "nimble build -d:release -d:timStandalone"
task fastparser, "testing a parser":
exec "nimble --mm:arc -d:release c src/timpkg/engine/fastparser.nim -o:./bin/fastparser"
task client, "build udp client":
exec "nimble c src/timpkg/server/client.nim"