From ee241e2d2909442e41886639c51c36226bebe65e Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Wed, 25 Sep 2024 13:21:19 -0500 Subject: [PATCH] add non-imported module to docs --- config.nims | 5 ++--- src/hwylterm.nim | 7 +++++++ src/hwylterm/cli.nim | 6 +++++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/config.nims b/config.nims index 77e64ee..7df5664 100644 --- a/config.nims +++ b/config.nims @@ -11,10 +11,9 @@ task docs, "Deploy doc html + search index to public/ directory": let deployDir = getCurrentDir() / "public" pkgName = "hwylterm" - srcFile = getCurrentDir() / fmt"src/{pkgName}.nim" gitUrl = fmt"https://github.com/daylinmorgan/{pkgName}" - # selfExec fmt"doc --index:on --git.url:{gitUrl} --git.commit:v{version} --outdir:{deployDir} --project {srcFile}" - selfExec fmt"doc --index:on --git.url:{gitUrl} --git.commit:main --outdir:{deployDir} --project {srcFile}" + selfExec fmt"doc --docRoot:{getCurrentDir()}/src/ --index:on --outdir:{deployDir} src/hwylterm/cli" + selfExec fmt"doc --project --index:on --git.url:{gitUrl} --git.commit:main --outdir:{deployDir} --project src/{pkgName}.nim" withDir deployDir: mvFile(pkgName & ".html", "index.html") for file in walkDirRec(".", {pcFile}): diff --git a/src/hwylterm.nim b/src/hwylterm.nim index 4901c5f..d60d390 100644 --- a/src/hwylterm.nim +++ b/src/hwylterm.nim @@ -1,2 +1,9 @@ +##[ + # Hwylterm + + [see bbansi](./hwylterm/bbansi.html) + [see cli](./hwylterm/cli.html) +]## + import hwylterm/[spin, bbansi] export spin, bbansi diff --git a/src/hwylterm/cli.nim b/src/hwylterm/cli.nim index 3d71f36..5e7aabe 100644 --- a/src/hwylterm/cli.nim +++ b/src/hwylterm/cli.nim @@ -1,4 +1,8 @@ -## adapter to add hwylterm colors to cligen output +##[ + # Hwylterm cligen adapter + + Adapter to add hwylterm colors to cligen output. +]## import std/[tables] import cligen import ./bbansi