@docusaurus/plugin-debug 2.0.0-beta.17 → 2.0.0-beta.18
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/lib/index.js
CHANGED
|
@@ -15,10 +15,10 @@ function pluginDebug({ siteConfig: { baseUrl }, generatedFilesDir, }) {
|
|
|
15
15
|
return {
|
|
16
16
|
name: 'docusaurus-plugin-debug',
|
|
17
17
|
getThemePath() {
|
|
18
|
-
return
|
|
18
|
+
return '../lib/theme';
|
|
19
19
|
},
|
|
20
20
|
getTypeScriptThemePath() {
|
|
21
|
-
return
|
|
21
|
+
return '../src/theme';
|
|
22
22
|
},
|
|
23
23
|
async contentLoaded({ actions: { createData, addRoute }, allContent }) {
|
|
24
24
|
const allContentPath = await createData(
|
|
@@ -20,7 +20,7 @@ function PluginContent({ pluginName, pluginContent, }) {
|
|
|
20
20
|
react_1.default.createElement("h3", null, pluginName),
|
|
21
21
|
react_1.default.createElement("div", null, Object.entries(pluginContent)
|
|
22
22
|
// filter plugin instances with no content
|
|
23
|
-
.filter(([
|
|
23
|
+
.filter(([, pluginInstanceContent]) => !!pluginInstanceContent)
|
|
24
24
|
.map(([pluginId, pluginInstanceContent]) => (react_1.default.createElement(PluginInstanceContent, { key: pluginId, pluginId: pluginId, pluginInstanceContent: pluginInstanceContent }))))));
|
|
25
25
|
}
|
|
26
26
|
function DebugContent({ allContent }) {
|
|
@@ -28,7 +28,7 @@ function DebugContent({ allContent }) {
|
|
|
28
28
|
react_1.default.createElement("h2", null, "Plugin content"),
|
|
29
29
|
react_1.default.createElement("div", null, Object.entries(allContent)
|
|
30
30
|
// filter plugins with no content
|
|
31
|
-
.filter(([
|
|
31
|
+
.filter(([, pluginContent]) => Object.values(pluginContent).some((instanceContent) => !!instanceContent))
|
|
32
32
|
.map(([pluginName, pluginContent]) => (react_1.default.createElement(PluginContent, { key: pluginName, pluginName: pluginName, pluginContent: pluginContent }))))));
|
|
33
33
|
}
|
|
34
34
|
exports.default = DebugContent;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/plugin-debug",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.18",
|
|
4
4
|
"description": "Debug plugin for Docusaurus.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/plugin-debug.d.ts",
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@docusaurus/core": "2.0.0-beta.
|
|
22
|
-
"@docusaurus/utils": "2.0.0-beta.
|
|
21
|
+
"@docusaurus/core": "2.0.0-beta.18",
|
|
22
|
+
"@docusaurus/utils": "2.0.0-beta.18",
|
|
23
23
|
"fs-extra": "^10.0.1",
|
|
24
24
|
"react-json-view": "^1.21.3",
|
|
25
25
|
"tslib": "^2.3.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@docusaurus/types": "2.0.0-beta.
|
|
28
|
+
"@docusaurus/types": "2.0.0-beta.18"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"react": "^16.8.4 || ^17.0.0",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"engines": {
|
|
35
35
|
"node": ">=14"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "1a945d06993d53376e61bed2c942799fe07dc336"
|
|
38
38
|
}
|
package/src/index.ts
CHANGED
|
@@ -24,10 +24,10 @@ export default function pluginDebug({
|
|
|
24
24
|
name: 'docusaurus-plugin-debug',
|
|
25
25
|
|
|
26
26
|
getThemePath() {
|
|
27
|
-
return
|
|
27
|
+
return '../lib/theme';
|
|
28
28
|
},
|
|
29
29
|
getTypeScriptThemePath() {
|
|
30
|
-
return
|
|
30
|
+
return '../src/theme';
|
|
31
31
|
},
|
|
32
32
|
|
|
33
33
|
async contentLoaded({actions: {createData, addRoute}, allContent}) {
|
|
@@ -31,7 +31,7 @@ function PluginContent({
|
|
|
31
31
|
pluginContent,
|
|
32
32
|
}: {
|
|
33
33
|
pluginName: string;
|
|
34
|
-
pluginContent:
|
|
34
|
+
pluginContent: {[pluginId: string]: unknown};
|
|
35
35
|
}) {
|
|
36
36
|
return (
|
|
37
37
|
<section style={{marginBottom: 60}}>
|
|
@@ -39,9 +39,7 @@ function PluginContent({
|
|
|
39
39
|
<div>
|
|
40
40
|
{Object.entries(pluginContent)
|
|
41
41
|
// filter plugin instances with no content
|
|
42
|
-
.filter(
|
|
43
|
-
([_pluginId, pluginInstanceContent]) => !!pluginInstanceContent,
|
|
44
|
-
)
|
|
42
|
+
.filter(([, pluginInstanceContent]) => !!pluginInstanceContent)
|
|
45
43
|
.map(([pluginId, pluginInstanceContent]) => (
|
|
46
44
|
<PluginInstanceContent
|
|
47
45
|
key={pluginId}
|
|
@@ -61,7 +59,7 @@ export default function DebugContent({allContent}: Props): JSX.Element {
|
|
|
61
59
|
<div>
|
|
62
60
|
{Object.entries(allContent)
|
|
63
61
|
// filter plugins with no content
|
|
64
|
-
.filter(([
|
|
62
|
+
.filter(([, pluginContent]) =>
|
|
65
63
|
Object.values(pluginContent).some(
|
|
66
64
|
(instanceContent) => !!instanceContent,
|
|
67
65
|
),
|