-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgrim.nimble
35 lines (28 loc) · 1.05 KB
/
grim.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.3.1"
author = "Erik G. Brandt"
description = "Bringer of property graphs to Nim!"
license = "MIT"
srcDir = "src"
# Dependencies
requires "nim >= 1.4"
requires "yaml#head"
requires "zero_functional"
# Tasks
# build HTML documentation
task docs, "Build the documentation (in HTML)":
# Build documentation from .rst files in docs/ folder
for dir in "docs" & listDirs("docs"):
for file in listFiles(dir):
if file[^4..^1] == ".rst":
selfExec "rst2html --outdir:$1 $2".format(dir, file)
# Build reference documentation from comments in code
selfExec "doc --outdir:docs/ --project --index:on --git.url:https://www.github.com/ebran/grim src/grim.nim"
selfExec "buildIndex --outdir:docs/ -o:docs/theindex docs"
# Get rid of xml header line
exec "sed -i '1d' docs/index.html"
# Tutorials
task northwind, "Northwind tutorial":
withDir("tutorials"):
# selfExec "c -r northwind.nim" # debug mode
selfExec "c -d:release -d:danger -r northwind.nim" # release mode