-
Notifications
You must be signed in to change notification settings - Fork 7
/
nimassets.nimble
35 lines (26 loc) · 907 Bytes
/
nimassets.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
# Package
version = "0.2.4"
author = "xmonader"
description = "bundle your assets to a nim"
license = "MIT"
srcDir = "src"
binDir = "build"
bin = @["nimassets"]
skipDirs = @["examples", "tests"]
# Dependencies
requires "nim >= 1.4.0"
requires "zstd >= 0.5.0"
proc build() =
exec "nimble build --threads:on -d:release"
task assetsBin, "Build nimassets":
build()
task buildTemplates, "bundle templates in templatesdir":
build()
exec "./build/nimassets -d=examples/templatesdir -o=examples/assetsfile.nim"
task buildTemplatesFast, "bundle templates in templatesdir fast":
build()
exec "./build/nimassets -d=examples/templatesdir -o=examples/assetsfilefast.nim -f"
before test:
build()
exec "./build/nimassets -d:tests/testassets -o:tests/assetfile.nim"
exec "./build/nimassets --fast -d:tests/testassets -o:tests/assetfile_fast.nim"