docusaurus-plugin-typedoc 0.21.0 → 0.22.0

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/plugin.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { LoadContext } from '@docusaurus/types';
2
2
  import { PluginOptions } from './types';
3
- export default function pluginDocusaurus(context: LoadContext, opts: Partial<PluginOptions>): {
3
+ export default function pluginDocusaurus(context: LoadContext, opts: Partial<PluginOptions>): Promise<{
4
4
  name: string;
5
- loadContent(): Promise<void>;
6
5
  extendCli(cli: any): void;
7
- };
6
+ }>;
package/dist/plugin.js CHANGED
@@ -30,15 +30,13 @@ const render_1 = require("./render");
30
30
  const theme_1 = require("./theme");
31
31
  const apps = [];
32
32
  const PLUGIN_NAME = 'docusaurus-plugin-typedoc';
33
- function pluginDocusaurus(context, opts) {
33
+ async function pluginDocusaurus(context, opts) {
34
+ if (opts.id && !apps.includes(opts.id)) {
35
+ apps.push(opts.id);
36
+ await generateTypedoc(context, opts);
37
+ }
34
38
  return {
35
39
  name: PLUGIN_NAME,
36
- async loadContent() {
37
- if (opts.id && !apps.includes(opts.id)) {
38
- apps.push(opts.id);
39
- generateTypedoc(context, opts);
40
- }
41
- },
42
40
  extendCli(cli) {
43
41
  cli
44
42
  .command('generate-typedoc')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docusaurus-plugin-typedoc",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "description": "A Docusaurus v2 plugin to build API documentation with TypeDoc.",
5
5
  "main": "dist/index.js",
6
6
  "files": [