'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
commit a4d40d137e
6 changed files with 8 additions and 6 deletions

View file

@ -82,3 +82,6 @@ This now needs to be written as:
Nimble package. Nimble package.
- Removed deprecated gentabs module from the stdlib and published it as separate - 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": of "php":
gCmd = cmdCompileToPHP gCmd = cmdCompileToPHP
commandCompileToJS(graph, cache) commandCompileToJS(graph, cache)
of "doc": of "doc0":
wantMainModule() wantMainModule()
gCmd = cmdDoc gCmd = cmdDoc
loadConfigs(DocConfig, cache) loadConfigs(DocConfig, cache)
commandDoc() commandDoc()
of "doc2": of "doc2", "doc":
gCmd = cmdDoc gCmd = cmdDoc
loadConfigs(DocConfig, cache) loadConfigs(DocConfig, cache)
defineSymbol("nimdoc") defineSymbol("nimdoc")

View file

@ -5,7 +5,6 @@
Command: Command:
//compile, c compile project with default code generator (C) //compile, c compile project with default code generator (C)
//doc generate the documentation for inputfile //doc generate the documentation for inputfile
//doc2 generate the documentation for inputfile
Arguments: Arguments:
arguments are passed to the program being run (if --run option is selected) 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) defined(dragonfly)
when defined(nimdoc): when defined(nimdoc):
type SocketHandle = int
type type
Selector*[T] = ref object Selector*[T] = ref object
## An object which holds descriptors to be checked for read/write status ## An object which holds descriptors to be checked for read/write status

View file

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

View file

@ -307,7 +307,7 @@ proc buildDoc(c: var TConfigData, destPath: string) =
destPath / changeFileExt(splitFile(d).name, "html"), d] destPath / changeFileExt(splitFile(d).name, "html"), d]
i.inc i.inc
for d in items(c.srcdoc): 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, [c.nimArgs, gitRepo,
destPath / changeFileExt(splitFile(d).name, "html"), d] destPath / changeFileExt(splitFile(d).name, "html"), d]
i.inc i.inc