Builds documentation support files. Still experimental.
This submodule provides functions for mimicking the documentation generation processes used when generating the official Hammerspoon documentation. The long term goal is to provide a mechanism for generating complete Hammerspoon documentation in all of its formats with only the Hammerspoon application and source files without any additional software required.
This submodule can be used to generate and maintain the documentation for Spoon bundles and can also be used to generate documentation for third-party modules as well.
Documentation for modules and spoons is expected to be embedded in the source code for the relevant object in specially formatted comment strings. A very brief example of how to format documentation can be found at https://github.com/Hammerspoon/hammerspoon/blob/master/SPOONS.md#documentation, but a better treatment is planned.
Most of this submodule should be considered at the "Proof of Concept" stage and will require some additional work on your part to generate useful documentation in HTML, Markdown, or Docset formats. This is expected to change in the future.
Signature | hs.doc.builder.genComments(path, [recurse]) -> table |
---|---|
Type | Function |
Description | Generates a documentation table for Hammerspoon modules or Spoon bundles from the source files located in the path(s) provided. Parameters:
Returns:
Notes:
|
Signature | hs.doc.builder.genJSON(source) -> string |
---|---|
Type | Function |
Description | Generates a JSON string representation of the documentation source specified. This is the format expected by Parameters:
Returns:
Notes:
|
Signature | hs.doc.builder.genSQL(source) -> string |
---|---|
Type | Function |
Description | Generates the SQL commands required for creating the search index when creating a docset of the documentation. Parameters:
Returns:
|