docusaurus-plugin-typedoc 1.0.0-next.13 → 1.0.0-next.14

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/dist/options.js CHANGED
@@ -43,11 +43,14 @@ function loadOptions(app) {
43
43
  this.supportsPackages = false;
44
44
  }
45
45
  read(container) {
46
- const plugins = container.getValue('plugin');
47
- container.setValue('plugin', plugins === null || plugins === void 0 ? void 0 : plugins.filter((plugin) => ![
46
+ const requiredPlugins = [
48
47
  'typedoc-plugin-markdown',
49
48
  'typedoc-plugin-frontmatter',
50
- ].includes(plugin)));
49
+ ];
50
+ const plugins = container.getValue('plugin');
51
+ container.setValue('plugin', [
52
+ ...new Set([...requiredPlugins, ...plugins]),
53
+ ]);
51
54
  }
52
55
  })());
53
56
  }
package/dist/plugin.js CHANGED
@@ -25,8 +25,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  const path = __importStar(require("path"));
27
27
  const typedoc_1 = require("typedoc");
28
- const typedoc_plugin_frontmatter_1 = require("typedoc-plugin-frontmatter");
29
- const typedoc_plugin_markdown_1 = require("typedoc-plugin-markdown");
30
28
  const options_1 = require("./options");
31
29
  const renderer_1 = require("./renderer");
32
30
  // store list of plugin ids when running multiple instances
@@ -37,7 +35,7 @@ function pluginDocusaurus(context, opts) {
37
35
  async loadContent() {
38
36
  if (opts.id && !apps.includes(opts.id)) {
39
37
  apps.push(opts.id);
40
- generateTypedoc(context, opts);
38
+ await generateTypedoc(context, opts);
41
39
  }
42
40
  },
43
41
  extendCli(cli) {
@@ -68,8 +66,6 @@ async function generateTypedoc(context, opts) {
68
66
  const app = new typedoc_1.Application();
69
67
  (0, options_1.loadOptions)(app);
70
68
  (0, renderer_1.loadRenderer)(app);
71
- (0, typedoc_plugin_markdown_1.load)(app);
72
- (0, typedoc_plugin_frontmatter_1.load)(app);
73
69
  await app.bootstrapWithPlugins(optionsPassedToTypeDoc);
74
70
  const project = app.convert();
75
71
  // if project is undefined typedoc has a problem - error logging will be supplied by typedoc.
package/dist/renderer.js CHANGED
@@ -1,14 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.loadRenderer = void 0;
4
- const typedoc_1 = require("typedoc");
5
4
  const typedoc_plugin_frontmatter_1 = require("typedoc-plugin-frontmatter");
6
5
  function loadRenderer(app) {
7
- app.renderer.on(typedoc_1.PageEvent.END, (page) => {
8
- if (page.contents) {
9
- page.contents = page.contents.replace(/\\</g, '<');
10
- }
11
- });
12
6
  app.renderer.on(typedoc_plugin_frontmatter_1.FrontmatterEvent.PREPARE_FRONTMATTER, (event) => {
13
7
  loadFrontmatter(app, event);
14
8
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docusaurus-plugin-typedoc",
3
- "version": "1.0.0-next.13",
3
+ "version": "1.0.0-next.14",
4
4
  "description": "A Docusaurus v2 plugin to build API documentation with TypeDoc.",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -19,13 +19,13 @@
19
19
  "typedoc-plugin-frontmatter": ">=0.0.2"
20
20
  },
21
21
  "peerDependencies": {
22
- "typedoc-plugin-markdown": ">=4.0.0-next.14"
22
+ "typedoc-plugin-markdown": ">=4.0.0-next.18"
23
23
  },
24
24
  "scripts": {
25
25
  "lint": "eslint ./src --ext .ts",
26
26
  "prepublishOnly": "npm run lint && npm run build",
27
27
  "build": "rm -rf ./dist && tsc",
28
- "build-and-test": "npm run build && npm run test"
28
+ "demo": "npm run build && cd demo && npm run start"
29
29
  },
30
30
  "author": "Thomas Grey",
31
31
  "license": "MIT",