Skip to content

Build System: Documentation

Lee Yi edited this page Apr 17, 2023 · 1 revision

Source Module Documentation

There are two types of documentation used by Source, which are the jsons and the HTML documentation. Both are built using the typedoc tool. By reading comments and type annotations, typedoc is able to generate both human readable documentation and documentation in the form of JSON.

Typedoc Initialization and HTML Generation

First, Typedoc is initialized with the following options:

This returns a an Application object, which can then be used to generate a ProjectReflection using [Application.convert()](), which is a representation of the module's documentation in object form in memory. Application.generateHtml() is then called to generate the HTML documentation.

JSON Generation

The ProjectReflection is then parsed by various parsers to produce the desired documentation object, which is then written to disk after converted into a JSON string.

Clone this wiki locally