docusaurus-plugin-typedoc 0.20.1 → 0.20.2
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.js +4 -3
- package/package.json +1 -1
package/dist/plugin.js
CHANGED
|
@@ -29,9 +29,10 @@ const options_1 = require("./options");
|
|
|
29
29
|
const render_1 = require("./render");
|
|
30
30
|
const theme_1 = require("./theme");
|
|
31
31
|
const apps = [];
|
|
32
|
+
const PLUGIN_NAME = 'docusaurus-plugin-typedoc';
|
|
32
33
|
function pluginDocusaurus(context, opts) {
|
|
33
34
|
return {
|
|
34
|
-
name:
|
|
35
|
+
name: PLUGIN_NAME,
|
|
35
36
|
async loadContent() {
|
|
36
37
|
if (opts.id && !apps.includes(opts.id)) {
|
|
37
38
|
apps.push(opts.id);
|
|
@@ -41,11 +42,11 @@ function pluginDocusaurus(context, opts) {
|
|
|
41
42
|
extendCli(cli) {
|
|
42
43
|
cli
|
|
43
44
|
.command('generate-typedoc')
|
|
44
|
-
.description(
|
|
45
|
+
.description(`(${PLUGIN_NAME}) Generate TypeDoc docs independently of the Docusaurus build process.`)
|
|
45
46
|
.action(async () => {
|
|
46
47
|
var _a;
|
|
47
48
|
(_a = context.siteConfig) === null || _a === void 0 ? void 0 : _a.plugins.forEach((pluginConfig) => {
|
|
48
|
-
if (pluginConfig && typeof pluginConfig[1] === 'object') {
|
|
49
|
+
if (pluginConfig && typeof pluginConfig[1] === 'object' && pluginConfig[0] === PLUGIN_NAME) {
|
|
49
50
|
generateTypedoc(context, pluginConfig[1]);
|
|
50
51
|
}
|
|
51
52
|
});
|