docgen improvements
This commit is contained in:
parent
bea62bb632
commit
093b1bae64
1 changed files with 4 additions and 3 deletions
|
|
@ -663,7 +663,7 @@ proc writeOutput*(d: PDoc, filename, outExt: string, useWarning = false) =
|
||||||
if optStdout in gGlobalOptions:
|
if optStdout in gGlobalOptions:
|
||||||
writeRope(stdout, content)
|
writeRope(stdout, content)
|
||||||
else:
|
else:
|
||||||
writeRope(content, getOutFile2(filename, outExt, "htmldoc"), useWarning)
|
writeRope(content, getOutFile2(filename, outExt, "htmldocs"), useWarning)
|
||||||
|
|
||||||
proc writeOutputJson*(d: PDoc, filename, outExt: string,
|
proc writeOutputJson*(d: PDoc, filename, outExt: string,
|
||||||
useWarning = false) =
|
useWarning = false) =
|
||||||
|
|
@ -674,7 +674,8 @@ proc writeOutputJson*(d: PDoc, filename, outExt: string,
|
||||||
write(stdout, $content)
|
write(stdout, $content)
|
||||||
else:
|
else:
|
||||||
var f: File
|
var f: File
|
||||||
if open(f, getOutFile2(filename, outExt, "jsondoc"), fmWrite):
|
if open(f, getOutFile2(splitFile(filename).name,
|
||||||
|
outExt, "jsondocs"), fmWrite):
|
||||||
write(f, $content)
|
write(f, $content)
|
||||||
close(f)
|
close(f)
|
||||||
else:
|
else:
|
||||||
|
|
@ -721,7 +722,7 @@ proc commandJson*() =
|
||||||
if optStdout in gGlobalOptions:
|
if optStdout in gGlobalOptions:
|
||||||
writeRope(stdout, content)
|
writeRope(stdout, content)
|
||||||
else:
|
else:
|
||||||
echo getOutFile(gProjectFull, JsonExt)
|
#echo getOutFile(gProjectFull, JsonExt)
|
||||||
writeRope(content, getOutFile(gProjectFull, JsonExt), useWarning = false)
|
writeRope(content, getOutFile(gProjectFull, JsonExt), useWarning = false)
|
||||||
|
|
||||||
proc commandBuildIndex*() =
|
proc commandBuildIndex*() =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue