generated from obsidianmd/obsidian-sample-plugin
-
-
Notifications
You must be signed in to change notification settings - Fork 239
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
contrib: Document use of TypeDoc to see a local website documenting t…
…he code.
- Loading branch information
1 parent
85005bc
commit 1ffacd2
Showing
5 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
publish: true | ||
--- | ||
|
||
# Generating documentation of the code | ||
|
||
It is now possible for developers to create a local documentation website showing the source code of the Tasks plugin. | ||
|
||
This can help gain an understanding of the code, and see relationships between classes and functions. | ||
|
||
## Generating the documentation | ||
|
||
```bash | ||
yarn code-docs | ||
``` | ||
|
||
This runs [TypeDoc](https://typedoc.org) to populate `code-docs/index.html` and related files. | ||
|
||
See the `typedocOptions` section in [tsconfig.json](https://github.com/obsidian-tasks-group/obsidian-tasks/blob/main/tsconfig.json) for options used. | ||
|
||
## Launching the documentation | ||
|
||
In WebStorm, use the following steps to view the generated documentation: | ||
|
||
1. Open `code-docs/index.html` | ||
2. Click on a browser icon to open the file in a browser of your choice. | ||
|
||
![How to use WebStorm to open a web server showing the code documentation](webstorm-open-code-docs.png) | ||
<span class="caption">How to use WebStorm to open a web server showing the code documentation</span> | ||
|
||
## Using the documentation | ||
|
||
A page like this (the Index) will open. | ||
|
||
![Screenshot showing the code docs](code-docs-index-page.png) | ||
<span class="caption">Screenshot showing the code docs</span> | ||
|
||
1. Use the links on the left to browse the source code and its documentation. | ||
2. The `Class Hierarchy` is especially useful. | ||
3. When viewing classes and files, these Settings will be useful. | ||
4. Click on the title to get back this Index page. | ||
|
||
## Class Hierarchy | ||
|
||
Here is a sample screenshot showing the class hierarchy: | ||
|
||
![Screenshot showing the class hierarchy as of 8th December 2024|200](class-hierarchy.png) | ||
<span class="caption">Screenshot showing the class hierarchy as of 8th December 2024</span> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.