From 4f6acf24ffde4c43ea9f8c954265d23312453b31 Mon Sep 17 00:00:00 2001 From: Juan Carlos Date: Fri, 3 Jul 2020 15:13:10 -0300 Subject: Add jsre (#14870) --- tools/kochdocs.nim | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tools') 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:$# $#" % -- cgit 1.4.1-2-gfad0