'nim doc' is now using version 2 of the documentation generator

This commit is contained in:
Andreas Rumpf
2017-11-16 12:53:36 +01:00
parent 25e825df3a
commit a4d40d137e
6 changed files with 8 additions and 6 deletions

View File

@@ -81,4 +81,7 @@ This now needs to be written as:
- Removed deprecated romans module from the stdlib and published it as separate
Nimble package.
- Removed deprecated gentabs module from the stdlib and published it as separate
Nimble package.
Nimble package.
- The ``nim doc`` command is now an alias for ``nim doc2``, the second version of
the documentation generator. The old version 1 can still be accessed
via the new ``nim doc0`` command.

View File

@@ -186,12 +186,12 @@ proc mainCommand*(graph: ModuleGraph; cache: IdentCache) =
of "php":
gCmd = cmdCompileToPHP
commandCompileToJS(graph, cache)
of "doc":
of "doc0":
wantMainModule()
gCmd = cmdDoc
loadConfigs(DocConfig, cache)
commandDoc()
of "doc2":
of "doc2", "doc":
gCmd = cmdDoc
loadConfigs(DocConfig, cache)
defineSymbol("nimdoc")

View File

@@ -5,7 +5,6 @@
Command:
//compile, c compile project with default code generator (C)
//doc generate the documentation for inputfile
//doc2 generate the documentation for inputfile
Arguments:
arguments are passed to the program being run (if --run option is selected)

View File

@@ -43,6 +43,7 @@ const bsdPlatform = defined(macosx) or defined(freebsd) or
defined(dragonfly)
when defined(nimdoc):
type SocketHandle = int
type
Selector*[T] = ref object
## An object which holds descriptors to be checked for read/write status

View File

@@ -1,7 +1,6 @@
version 1.0 battle plan
=======================
- make 'doc2' an alias for 'doc' and introduce 'doc0'
- make 'break' not leave named blocks
- make FlowVar compatible to Futures
- fix "high priority" bugs

View File

@@ -307,7 +307,7 @@ proc buildDoc(c: var TConfigData, destPath: string) =
destPath / changeFileExt(splitFile(d).name, "html"), d]
i.inc
for d in items(c.srcdoc):
commands[i] = findNim() & " doc $# --git.url:$# -o:$# --index:on $#" %
commands[i] = findNim() & " doc0 $# --git.url:$# -o:$# --index:on $#" %
[c.nimArgs, gitRepo,
destPath / changeFileExt(splitFile(d).name, "html"), d]
i.inc