-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Updated code comments and cleaned-up code.
- Loading branch information
Showing
27 changed files
with
1,364 additions
and
184 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
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
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
export default { | ||
entryFileName: 'Home.md', | ||
hidePageHeader: true, | ||
githubPages: false, | ||
}; |
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
export default { | ||
entryFileName: 'home.md', | ||
hidePageHeader: true, | ||
githubPages: false, | ||
}; |
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 |
---|---|---|
@@ -1,3 +1,102 @@ | ||
# Contributing guidelines | ||
|
||
Contributions and suggestions are welcome. Contributing guidelines coming soon. | ||
> Please note this guide is work in progress! | ||
Thank you showing interest in contributing to this plugin - contributions and suggestions are very welcome. | ||
|
||
## Overview | ||
|
||
This is a simple monorepo managed by [npm workspaces](https://docs.npmjs.com/cli/v7/using-npm/workspaces) with `typedoc-plugin-markdown` the "core" package. This guide is for developing inside the `typedoc-plugin-markdown` core package. | ||
|
||
This guide does not cover TypeDoc specifically so it might be useful to read the [TypeDoc development guide](https://typedoc.org/guides/development/) for an overview on TypeDoc's architecture. | ||
|
||
## Getting started | ||
|
||
1. Clone the repository:<br />`git clone [email protected]:tgreyuk/typedoc-plugin-markdown.git` | ||
|
||
2. Checkout the `next` branch:<br />`git checkout next` | ||
|
||
3. Install dependecnices from the repository root.<br />`npm install` | ||
|
||
4. cd into the package:<br />`cd packages/typedoc-plugin-markdown` | ||
|
||
5. Build and run tests:<br />`npm run build-and-test` | ||
|
||
If the project builds and the tests run successfully you are ready to get going. | ||
|
||
## High-level architecture | ||
|
||
At a high level the codebase consists of an exposed TypeDoc plugin along side an assoicated theme. | ||
|
||
To start getting familiar with the code browse the `src` directory: | ||
|
||
``` | ||
├── src | ||
│ ├── index.ts // exposed public api | ||
│ ├── plugin // plugin code | ||
│ ├── support | ||
│ └── theme // theme code | ||
``` | ||
|
||
At a highlevel: | ||
|
||
- `index.ts` contains the public api and exports the required `load` funtion. | ||
- The `plugin` folder contains functionality to setup the plugin and configure the renderer. | ||
- The `support` folder contains agnostic support helpers used in the plugin. | ||
- The `theme` folder contains the logic that sets up the custom Markdown theme. | ||
|
||
Use the command to build the codebase and then run some example docs to the out folder. | ||
|
||
```shell | ||
npm run docs | ||
``` | ||
|
||
Additional stub data can be created in the `../stubs` folder. | ||
|
||
Please refer to the [API docs](./docs/api/README.md) for automated documentation generated by TypeDoc and this plugin. | ||
|
||
## Testing | ||
|
||
Test use the [Jest](https://jestjs.io/) with [ts-jest](https://kulshekhar.github.io/ts-jest/) as the test framework. To run all tests use the following command: | ||
|
||
```shell | ||
npm run test | ||
``` | ||
|
||
Jest snapshots are used quite heavily to compare the output generated from templates. To update the snapshots run with the `update` flag. | ||
|
||
## Linting | ||
|
||
To run linting on the project use: | ||
|
||
```shell | ||
npm run lint | ||
``` | ||
|
||
Both the code and some example generated markdown are linted using [eslint](https://eslint.org/) and [markdowmlint](https://github.com/DavidAnson/markdownlint) respectively. | ||
|
||
## Submitting a PR | ||
|
||
Please create a PR with a clear description of what the change is. | ||
|
||
If the PR requires a new package release please also create a [changeset](https://github.com/changesets/changesets) which is the tool used for versioning and releasing packages. | ||
|
||
Run the changeset command in the project root: | ||
|
||
```shell | ||
npx changeset | ||
``` | ||
|
||
A one line changeset description will be enough but please ensure the correct semantic version is selected `patch` for a bug fix or `minor` for a new feature. | ||
|
||
The resulting changeset file will something like this: | ||
|
||
```markdown | ||
--- | ||
'typedoc-plugin-markdown': patch | ||
--- | ||
|
||
- A simple description for a patch fix. This message will also appear in the changelog. | ||
``` | ||
|
||
Please also submit this file with the PR. |
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,10 @@ | ||
# typedoc-plugin-markdown | ||
|
||
## Modules | ||
|
||
- [plugin/bootstrap](plugin/bootstrap/README.md) | ||
- [theme/theme](theme/theme/README.md) | ||
|
||
*** | ||
|
||
Generated using [TypeDoc](https://typedoc.org) and [typedoc-plugin-markdown](https://typedoc-plugin-markdown.org). |
15 changes: 15 additions & 0 deletions
15
packages/typedoc-plugin-markdown/docs/api/plugin/bootstrap/README.md
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,15 @@ | ||
[typedoc-plugin-markdown](../../README.md) / plugin/bootstrap | ||
|
||
# plugin/bootstrap | ||
|
||
Exposes the [load](functions/load.md) function that is called by TypeDoc to bootstrap the plugin, expose options and define the th. | ||
|
||
## Index | ||
|
||
### Functions | ||
|
||
- [load](functions/load.md) | ||
|
||
*** | ||
|
||
Generated using [TypeDoc](https://typedoc.org) and [typedoc-plugin-markdown](https://typedoc-plugin-markdown.org). |
25 changes: 25 additions & 0 deletions
25
packages/typedoc-plugin-markdown/docs/api/plugin/bootstrap/functions/load.md
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,25 @@ | ||
[typedoc-plugin-markdown](../../../README.md) / [plugin/bootstrap](../README.md) / load | ||
|
||
# Function: load() | ||
|
||
> **load**(`app`): `void` | ||
The main plugin entrypoint containing all bootstrapping logic. | ||
|
||
Here we expose additional TypeDoc options and make some adjustments to [Renderer]([object Object]). | ||
|
||
## Parameters | ||
|
||
• **app**: [`Application`]( https://typedoc.org/api/classes/Application.html ) | ||
|
||
## Returns | ||
|
||
`void` | ||
|
||
## Source | ||
|
||
[packages/typedoc-plugin-markdown/src/plugin/bootstrap.ts:24](https://github.com/tgreyuk/typedoc-plugin-markdown/blob/62f0eacf/packages/typedoc-plugin-markdown/src/plugin/bootstrap.ts#L24) | ||
|
||
*** | ||
|
||
Generated using [TypeDoc](https://typedoc.org) and [typedoc-plugin-markdown](https://typedoc-plugin-markdown.org). |
13 changes: 13 additions & 0 deletions
13
packages/typedoc-plugin-markdown/docs/api/theme/theme/README.md
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,13 @@ | ||
[typedoc-plugin-markdown](../../README.md) / theme/theme | ||
|
||
# theme/theme | ||
|
||
## Index | ||
|
||
### Classes | ||
|
||
- [MarkdownTheme](classes/MarkdownTheme.md) | ||
|
||
*** | ||
|
||
Generated using [TypeDoc](https://typedoc.org) and [typedoc-plugin-markdown](https://typedoc-plugin-markdown.org). |
Oops, something went wrong.