v/cmd/v/help/doc.txt

36 lines
1.5 KiB
Plaintext

Usage:
v doc [flags] [module_name / folder / V file] [symbol name]
Examples:
v doc os
v doc os File
v doc -o math.html math
v doc -m -f html vlib/
Generates the documentation of a given directory, module, or V source file
and prints or saves them to its desired format. It can generate HTML, JSON,
or Markdown format.
Options:
-all Includes private and public functions/methods/structs/consts/enums.
-f Specifies the output format to be used.
-h, -help Prints this help text.
-m Generate docs for modules listed in that folder.
-o Specifies the output file/folder path where to store the generated docs.
Set it to "stdout" to print the output instead of saving the contents
to a file.
-readme Include README.md to docs if present.
-v Enables verbose logging. For debugging purposes.
-filename Specifies the specific file to document.
-pos Specifies the position. Used with `-filename`.
-no-timestamp Omit timestamp in the output file.
For HTML mode:
-inline-assets Embeds the contents of the CSS and JS assets into the webpage directly.
-open Launches the browser when the server docs has started.
-p Specifies the port to be used for the docs server.
-s Serve HTML-generated docs via HTTP.
For plain text mode:
-l Show the locations of the generated signatures.