diff options
author | Juan Carlos <juancarlospaco@gmail.com> | 2020-07-03 15:13:10 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-03 20:13:10 +0200 |
commit | 4f6acf24ffde4c43ea9f8c954265d23312453b31 (patch) | |
tree | ba7b13030f1184b15307ab2e8bbf87875cf515cc /tools/kochdocs.nim | |
parent | a6cbe58e8c5a9b89d749d9935ee39192de3246d9 (diff) | |
download | Nim-4f6acf24ffde4c43ea9f8c954265d23312453b31.tar.gz |
Add jsre (#14870)
Diffstat (limited to 'tools/kochdocs.nim')
-rw-r--r-- | tools/kochdocs.nim | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/kochdocs.nim b/tools/kochdocs.nim index 12d3c31a3..43b802ee2 100644 --- a/tools/kochdocs.nim +++ b/tools/kochdocs.nim @@ -15,6 +15,8 @@ const var nimExe*: string +template isJsOnly(file: string): bool = file.isRelativeTo("lib/js") + proc exe*(f: string): string = result = addFileExt(f, ExeExt) when defined(windows): @@ -256,10 +258,11 @@ proc buildDoc(nimArgs, destPath: string) = destPath / changeFileExt(splitFile(d).name, "html"), d] i.inc for d in items(doc): + let extra = if isJsOnly(d): " --backend:js " else: "" var nimArgs2 = nimArgs if d.isRelativeTo("compiler"): doAssert false - commands[i] = nim & " doc $# --git.url:$# --outdir:$# --index:on $#" % - [nimArgs2, gitUrl, destPath, d] + commands[i] = nim & " doc $# $# --git.url:$# --outdir:$# --index:on $#" % + [extra, nimArgs2, gitUrl, destPath, d] i.inc for d in items(withoutIndex): commands[i] = nim & " doc2 $# --git.url:$# -o:$# $#" % |