docusaurus-plugin-typedoc 1.0.0-next.26 → 1.0.0-next.28

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # docusaurus-plugin-typedoc
2
2
 
3
- ![npm](https://img.shields.io/npm/v/docusaurus-plugin-typedoc%2Fnext?&logo=npm) ![Downloads](https://img.shields.io/npm/dm/docusaurus-plugin-typedoc) [![Build Status](https://github.com/tgreyuk/typedoc-plugin-markdown/actions/workflows/ci.yml/badge.svg?branch=next)](https://github.com/tgreyuk/typedoc-plugin-markdown/actions/workflows/ci.yml)
3
+ ![npm](https://img.shields.io/npm/v/docusaurus-plugin-typedoc%2Fnext?&logo=npm) [![Build Status](https://github.com/tgreyuk/typedoc-plugin-markdown/actions/workflows/ci.yml/badge.svg?branch=next)](https://github.com/tgreyuk/typedoc-plugin-markdown/actions/workflows/ci.yml)
4
4
 
5
5
  A Docusaurus plugin to integrate TypeDoc into a Docusaurus project.
6
6
 
@@ -12,8 +12,4 @@ A Docusaurus plugin to integrate TypeDoc into a Docusaurus project.
12
12
 
13
13
  ## Documentation
14
14
 
15
- Please visit https://typedoc-plugin-markdown.org/integrations/docusaurus.
16
-
17
- ## License
18
-
19
- Released under the [MIT License](./LICENSE).
15
+ Please visit [typedoc-plugin-markdown.org](https://typedoc-plugin-markdown.org/integrations/docusaurus/introduction) for comprehensive documentation, including options and usage guides.
package/dist/plugin.js CHANGED
@@ -93,7 +93,7 @@ module.exports = typedocSidebar.items;`);
93
93
  return;
94
94
  }
95
95
  console.error('[docusaurus-plugin-typedoc] TypeDoc exited with an error. Use the "skipErrorChecking" option to disable TypeDoc error checking.');
96
- process.exit();
96
+ process.exit(1);
97
97
  }
98
98
  if (app.options.getValue('watch')) {
99
99
  app.convertAndWatch(async (project) => {
package/dist/sidebar.js CHANGED
@@ -11,9 +11,20 @@ function getNavigationItem(navigationItem, basePath, filteredIds, numberPrefixPa
11
11
  const parsedUrl = numberPrefixParser === false
12
12
  ? navigationItem.url
13
13
  : navigationItem.url?.replace(/\d+\-/g, '');
14
- const id = navigationItem.url
15
- ? `${basePath}/${parsedUrl}`.replace(/(.*).md/, '$1')
16
- : null;
14
+ const getId = () => {
15
+ const idParts = [];
16
+ if (basePath.length > 0) {
17
+ idParts.push(basePath);
18
+ }
19
+ if (parsedUrl) {
20
+ idParts.push(parsedUrl);
21
+ }
22
+ if (navigationItem.url) {
23
+ return idParts.join('/').replace(/(.*).md/, '$1');
24
+ }
25
+ return null;
26
+ };
27
+ const id = getId();
17
28
  if (navigationItem.children?.length) {
18
29
  return {
19
30
  type: 'category',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docusaurus-plugin-typedoc",
3
- "version": "1.0.0-next.26",
3
+ "version": "1.0.0-next.28",
4
4
  "description": "A Docusaurus plugin to integrate TypeDoc into a Docusaurus project.",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -16,15 +16,15 @@
16
16
  },
17
17
  "homepage": "https://github.com/tgreyuk/typedoc-plugin-markdown/tree/master/packages/docusaurus-plugin-typedoc",
18
18
  "peerDependencies": {
19
- "typedoc-plugin-markdown": ">=4.0.0-next.44"
19
+ "typedoc-plugin-markdown": ">=4.0.0-next.45"
20
20
  },
21
21
  "scripts": {
22
22
  "lint": "eslint ./src --ext .ts",
23
23
  "prepublishOnly": "npm run lint && npm run build",
24
24
  "build": "rm -rf ./dist && tsc",
25
- "build-and-test": "npm run build && npm run test",
25
+ "pretest": "rm -rf ./test/out && docusaurus generate-typedoc",
26
26
  "test": "jest",
27
- "test:update": "npm test -- -u"
27
+ "test:update": "npm run build && npm test -- -u"
28
28
  },
29
29
  "author": "Thomas Grey",
30
30
  "license": "MIT",
@@ -37,6 +37,7 @@
37
37
  "api"
38
38
  ],
39
39
  "devDependencies": {
40
+ "@docusaurus/core": "^3.1.1",
40
41
  "@docusaurus/types": "^3.1.1"
41
42
  }
42
43
  }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 Thomas Grey
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.