-
Notifications
You must be signed in to change notification settings - Fork 1
/
jsonpak.nimble
39 lines (33 loc) · 1.07 KB
/
jsonpak.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
# Package
version = "1.1.2"
author = "planetis-m"
description = "Packed ASTs for compact and efficient JSON representation, with JSON Pointer, JSON Patch support."
license = "MIT"
srcDir = "src"
# Dependencies
requires "nim >= 1.9.3"
import os
let
projectUrl = "https://github.com/planetis-m/jsonpak"
pkgDir = thisDir().quoteShell
docsDir = "docs"
task docs, "Generate documentation":
# https://nim-lang.github.io/Nim/docgen.html
let filenames = [
"jsonpak",
"jsonpak" / "builder",
"jsonpak" / "dollar",
"jsonpak" / "extra",
"jsonpak" / "jsonptr",
"jsonpak" / "mapper",
"jsonpak" / "parser",
"jsonpak" / "patch",
"jsonpak" / "sorted"
]
withDir(pkgDir):
for file in filenames:
let doc = docsDir / (file.extractFilename & ".html")
# Generate the docs for {src}
exec("nim doc --index:on --verbosity:0 --git.url:" & projectUrl &
" --git.devel:main --git.commit:main --out:" & doc & " " & (srcDir / file))
exec("nim buildIndex --out:" & (docsDir / "index.html") & " " & docsDir)