diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2018-10-01 14:22:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-01 14:22:36 +0200 |
commit | aab6b31c8b34a6dbde7bad5d167c850673e1feae (patch) | |
tree | 4049e12f64bbb89ff0e3a7bf181aa85625965a78 /tools | |
parent | 5298c509a7b0168f0edce9b28442feca914d15f7 (diff) | |
parent | 2e5c759736a9458b192a3beb2cf3a38b2f198887 (diff) | |
download | Nim-aab6b31c8b34a6dbde7bad5d167c850673e1feae.tar.gz |
Merge pull request #9110 from kaushalmodi/dochackjs-kochdoc-update
Make "koch docs" copy the dochack.js to the right location too
Diffstat (limited to 'tools')
-rw-r--r-- | tools/kochdocs.nim | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/tools/kochdocs.nim b/tools/kochdocs.nim index 3c4ded75e..d52e14a7c 100644 --- a/tools/kochdocs.nim +++ b/tools/kochdocs.nim @@ -7,8 +7,9 @@ const nimArgs = "--hint[Conf]:off --hint[Path]:off --hint[Processing]:off -d:boot --putenv:nimversion=$#" % system.NimVersion gitUrl = "https://github.com/nim-lang/Nim" - docHtmlOutput = "doc/html" - webUploadOutput = "web/upload" + docHtmlOutput = "doc" / "html" + webUploadOutput = "web" / "upload" + docHackDir = "tools" / "dochack" proc exe*(f: string): string = result = addFileExt(f, ExeExt) @@ -269,8 +270,6 @@ proc buildDocSamples(nimArgs, destPath: string) = exec(findNim() & " doc $# -o:$# $#" % [nimArgs, destPath / "docgen_sample.html", "doc" / "docgen_sample.nim"]) -proc pathPart(d: string): string = splitFile(d).dir.replace('\\', '/') - proc buildDoc(nimArgs, destPath: string) = # call nim for the documentation: var @@ -327,11 +326,15 @@ proc buildPdfDoc*(nimArgs, destPath: string) = proc buildJS() = exec(findNim() & " js -d:release --out:$1 web/nimblepkglist.nim" % [webUploadOutput / "nimblepkglist.js"]) - exec(findNim() & " js tools/dochack/dochack.nim") + exec(findNim() & " js " & (docHackDir / "dochack.nim")) proc buildDocs*(args: string) = - let a = nimArgs & " " & args - buildJS() + let + a = nimArgs & " " & args + docHackJs = "dochack.js" + docHackJsSource = docHackDir / "nimcache" / docHackJs + docHackJsDest = docHtmlOutput / docHackJs + buildJS() # This call generates docHackJsSource let docup = webUploadOutput / NimVersion createDir(docup) buildDocSamples(a, docup) @@ -342,3 +345,4 @@ proc buildDocs*(args: string) = createDir(docHtmlOutput) buildDocSamples(nimArgs, docHtmlOutput) buildDoc(nimArgs, docHtmlOutput) + copyFileWithPermissions(docHackJsSource, docHackJsDest) |