docusaurus-plugin-typedoc 0.16.6 → 0.16.7

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
@@ -19,6 +19,7 @@ const DEFAULT_PLUGIN_OPTIONS = {
19
19
  plugin: ['none'],
20
20
  watch: false,
21
21
  indexSlug: undefined,
22
+ theme: 'docusaurus',
22
23
  };
23
24
  const getPluginOptions = (opts) => {
24
25
  const options = {
package/dist/plugin.js CHANGED
@@ -24,6 +24,7 @@ const typedoc_1 = require("typedoc");
24
24
  const typedoc_plugin_markdown_1 = require("typedoc-plugin-markdown");
25
25
  const options_1 = require("./options");
26
26
  const render_1 = require("./render");
27
+ const theme_1 = require("./theme");
27
28
  const apps = [];
28
29
  function pluginDocusaurus(context, opts) {
29
30
  return {
@@ -36,7 +37,7 @@ function pluginDocusaurus(context, opts) {
36
37
  const outputDir = path.resolve(siteDir, options.docsRoot, options.out);
37
38
  (0, render_1.removeDir)(outputDir);
38
39
  const app = new typedoc_1.Application();
39
- app.options.setValue('theme', path.resolve(__dirname));
40
+ app.renderer.defineTheme('docusaurus', theme_1.DocusaurusTheme);
40
41
  (0, typedoc_plugin_markdown_1.load)(app);
41
42
  (0, render_1.bootstrap)(app, options);
42
43
  const project = app.convert();
package/dist/render.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import { Application } from 'typedoc';
1
+ import { Application, ProjectReflection } from 'typedoc';
2
2
  import { PluginOptions } from './types';
3
3
  export declare const bootstrap: (app: Application, options: PluginOptions) => void;
4
+ export declare function render(project: ProjectReflection, outputDirectory: string): Promise<void>;
4
5
  export declare function removeDir(path: string): void;
package/dist/render.js CHANGED
@@ -19,7 +19,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
19
19
  return result;
20
20
  };
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.removeDir = exports.bootstrap = void 0;
22
+ exports.removeDir = exports.render = exports.bootstrap = void 0;
23
23
  const fs = __importStar(require("fs"));
24
24
  const typedoc_1 = require("typedoc");
25
25
  const bootstrap = (app, options) => {
@@ -31,6 +31,9 @@ const bootstrap = (app, options) => {
31
31
  exports.bootstrap = bootstrap;
32
32
  async function render(project, outputDirectory) {
33
33
  var _a;
34
+ if (!this.prepareTheme()) {
35
+ return;
36
+ }
34
37
  const output = new typedoc_1.RendererEvent(typedoc_1.RendererEvent.BEGIN, outputDirectory, project);
35
38
  output.urls = this.theme.getUrls(project);
36
39
  this.trigger(output);
@@ -41,6 +44,7 @@ async function render(project, outputDirectory) {
41
44
  this.trigger(typedoc_1.RendererEvent.END, output);
42
45
  }
43
46
  }
47
+ exports.render = render;
44
48
  const addTypedocReaders = (app) => {
45
49
  app.options.addReader(new typedoc_1.TypeDocReader());
46
50
  app.options.addReader(new typedoc_1.TSConfigReader());
package/dist/types.d.ts CHANGED
@@ -15,6 +15,7 @@ export interface PluginOptions {
15
15
  hidePageTitle: boolean;
16
16
  entryDocument: string;
17
17
  indexSlug?: string;
18
+ theme?: string;
18
19
  }
19
20
  export interface FrontMatter {
20
21
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docusaurus-plugin-typedoc",
3
- "version": "0.16.6",
3
+ "version": "0.16.7",
4
4
  "description": "A Docusaurus v2 plugin to build API documentation with TypeDoc.",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -16,8 +16,8 @@
16
16
  },
17
17
  "homepage": "https://github.com/tgreyuk/typedoc-plugin-markdown/tree/master/packages/docusaurus-plugin-typedoc",
18
18
  "peerDependencies": {
19
- "typedoc": ">=0.21.0",
20
- "typedoc-plugin-markdown": ">=3.10.0"
19
+ "typedoc": ">=0.22.0",
20
+ "typedoc-plugin-markdown": ">=3.11.10"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@docusaurus/types": "^2.0.0-beta.0"
@@ -42,5 +42,5 @@
42
42
  "typescript",
43
43
  "api"
44
44
  ],
45
- "gitHead": "eece3f13ce3b48ac51c119b432869983fc45cc6d"
45
+ "gitHead": "7a9b045eaacfdafd14c3427379d410c45f6b990b"
46
46
  }