docusaurus-plugin-typedoc 1.0.0-next.29 → 1.0.0-next.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/options/declarations.d.ts +0 -15
- package/dist/options/declarations.js +0 -15
- package/dist/plugin.js +3 -5
- package/dist/sidebar.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
 [](https://github.com/tgreyuk/typedoc-plugin-markdown/actions/workflows/ci.yml)
|
|
4
4
|
|
|
5
|
-
A Docusaurus plugin to integrate TypeDoc into a Docusaurus project.
|
|
5
|
+
A Docusaurus plugin to integrate TypeDoc ( + typedoc-plugin-markdown ) into a Docusaurus project.
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { ParameterType } from 'typedoc';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* > *In addition to the sidebar options listed below, you can configure the structure of the sidebar by utilizing the TypeDoc [`navigation options`](https://typedoc.org/options/output/#navigation) `includeGroups`, `includeCategories` and `includeFolders`*.
|
|
5
|
-
*
|
|
6
3
|
* **sidebar.autoConfiguration**
|
|
7
4
|
*
|
|
8
5
|
* Set to `false` to disable sidebar generation. Defaults to `true`.
|
|
@@ -13,18 +10,6 @@ import { ParameterType } from 'typedoc';
|
|
|
13
10
|
*
|
|
14
11
|
* Please see the [sidebar guide](/plugins/docusaurus/guide/sidebar) for additional information on sidebar setup.
|
|
15
12
|
*
|
|
16
|
-
* ```json filename="Example"
|
|
17
|
-
* "navigation": {
|
|
18
|
-
* "includeGroups": true,
|
|
19
|
-
* "includeCategories": true
|
|
20
|
-
* },
|
|
21
|
-
* "sidebar": {
|
|
22
|
-
* "pretty": true
|
|
23
|
-
* }
|
|
24
|
-
* ```
|
|
25
|
-
*
|
|
26
|
-
* @omitExample
|
|
27
|
-
*
|
|
28
13
|
*/
|
|
29
14
|
export declare const sidebar: {
|
|
30
15
|
help: string;
|
|
@@ -4,9 +4,6 @@ exports.sidebar = void 0;
|
|
|
4
4
|
const typedoc_1 = require("typedoc");
|
|
5
5
|
const options_1 = require("../options");
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
* > *In addition to the sidebar options listed below, you can configure the structure of the sidebar by utilizing the TypeDoc [`navigation options`](https://typedoc.org/options/output/#navigation) `includeGroups`, `includeCategories` and `includeFolders`*.
|
|
9
|
-
*
|
|
10
7
|
* **sidebar.autoConfiguration**
|
|
11
8
|
*
|
|
12
9
|
* Set to `false` to disable sidebar generation. Defaults to `true`.
|
|
@@ -17,18 +14,6 @@ const options_1 = require("../options");
|
|
|
17
14
|
*
|
|
18
15
|
* Please see the [sidebar guide](/plugins/docusaurus/guide/sidebar) for additional information on sidebar setup.
|
|
19
16
|
*
|
|
20
|
-
* ```json filename="Example"
|
|
21
|
-
* "navigation": {
|
|
22
|
-
* "includeGroups": true,
|
|
23
|
-
* "includeCategories": true
|
|
24
|
-
* },
|
|
25
|
-
* "sidebar": {
|
|
26
|
-
* "pretty": true
|
|
27
|
-
* }
|
|
28
|
-
* ```
|
|
29
|
-
*
|
|
30
|
-
* @omitExample
|
|
31
|
-
*
|
|
32
17
|
*/
|
|
33
18
|
exports.sidebar = {
|
|
34
19
|
help: 'Configures the autogenerated Docusaurus sidebar.',
|
package/dist/plugin.js
CHANGED
|
@@ -56,12 +56,12 @@ async function pluginDocusaurus(context, opts) {
|
|
|
56
56
|
}
|
|
57
57
|
exports.default = pluginDocusaurus;
|
|
58
58
|
/**
|
|
59
|
-
* Initiates a new typedoc Application
|
|
59
|
+
* Initiates a new typedoc Application bootstrapped with plugin options
|
|
60
60
|
*/
|
|
61
61
|
async function generateTypedoc(context, opts) {
|
|
62
62
|
const { siteDir } = context;
|
|
63
|
-
const
|
|
64
|
-
const { id, sidebar, ...optionsPassedToTypeDoc } =
|
|
63
|
+
const pluginOptions = (0, options_1.getPluginOptions)(opts);
|
|
64
|
+
const { id, sidebar, ...optionsPassedToTypeDoc } = pluginOptions;
|
|
65
65
|
const app = await typedoc_1.Application.bootstrapWithPlugins(optionsPassedToTypeDoc);
|
|
66
66
|
Object.entries(options).forEach(([name, option]) => {
|
|
67
67
|
app.options.addDeclaration({
|
|
@@ -75,8 +75,6 @@ async function generateTypedoc(context, opts) {
|
|
|
75
75
|
app.renderer.postRenderAsyncJobs.push(async (output) => {
|
|
76
76
|
if (output.navigation) {
|
|
77
77
|
const sidebarPath = path.resolve(outputDir, 'typedoc-sidebar.cjs');
|
|
78
|
-
const sidebarJSONPath = path.resolve(outputDir, 'typedoc-sidebar.json');
|
|
79
|
-
fs.writeFileSync(sidebarJSONPath, JSON.stringify(output.navigation, null, 2));
|
|
80
78
|
const baseDir = path
|
|
81
79
|
.relative(siteDir, outputDir)
|
|
82
80
|
.split(path.sep)
|
package/dist/sidebar.js
CHANGED
|
@@ -17,7 +17,7 @@ function getNavigationItem(navigationItem, basePath, numberPrefixParser) {
|
|
|
17
17
|
idParts.push(basePath);
|
|
18
18
|
}
|
|
19
19
|
if (parsedUrl) {
|
|
20
|
-
idParts.push(parsedUrl);
|
|
20
|
+
idParts.push(parsedUrl.replace(/\\/g, '/'));
|
|
21
21
|
}
|
|
22
22
|
if (navigationItem.path) {
|
|
23
23
|
return idParts.join('/').replace(/(.*)\.\w+$/, '$1');
|
package/package.json
CHANGED