@umijs/plugin-docs 4.0.20 → 4.0.22
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/index.js
CHANGED
|
@@ -1,26 +1,9 @@
|
|
|
1
1
|
var __create = Object.create;
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
9
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
-
var __spreadValues = (a, b) => {
|
|
13
|
-
for (var prop in b || (b = {}))
|
|
14
|
-
if (__hasOwnProp.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
if (__getOwnPropSymbols)
|
|
17
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
-
if (__propIsEnum.call(b, prop))
|
|
19
|
-
__defNormalProp(a, prop, b[prop]);
|
|
20
|
-
}
|
|
21
|
-
return a;
|
|
22
|
-
};
|
|
23
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
7
|
var __export = (target, all) => {
|
|
25
8
|
for (var name in all)
|
|
26
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -62,9 +45,10 @@ var src_default = (api) => {
|
|
|
62
45
|
});
|
|
63
46
|
}
|
|
64
47
|
api.modifyDefaultConfig((memo) => {
|
|
65
|
-
memo.conventionRoutes =
|
|
48
|
+
memo.conventionRoutes = {
|
|
49
|
+
...memo.conventionRoutes,
|
|
66
50
|
base: (0, import_path.join)(api.cwd, "docs")
|
|
67
|
-
}
|
|
51
|
+
};
|
|
68
52
|
memo.mdx = {
|
|
69
53
|
loader: require.resolve("./loader"),
|
|
70
54
|
loaderOptions: {}
|
|
@@ -101,9 +85,10 @@ var src_default = (api) => {
|
|
|
101
85
|
const defaultLangFile = r[route].file.replace(/(.[a-z]{2}-[A-Z]{2})?.md$/, "");
|
|
102
86
|
Object.keys(locales).map((l) => {
|
|
103
87
|
if (r[defaultLangFile] && !r[defaultLangFile + "." + l]) {
|
|
104
|
-
r[defaultLangFile + "." + l] =
|
|
88
|
+
r[defaultLangFile + "." + l] = {
|
|
89
|
+
...r[defaultLangFile],
|
|
105
90
|
path: `/${l}/${r[defaultLangFile].path}`
|
|
106
|
-
}
|
|
91
|
+
};
|
|
107
92
|
}
|
|
108
93
|
});
|
|
109
94
|
}
|
|
@@ -155,9 +140,10 @@ export default () => {
|
|
|
155
140
|
api.chainWebpack((memo) => {
|
|
156
141
|
if (api.env === "development") {
|
|
157
142
|
memo.plugin("fastRefresh").tap(([params]) => [
|
|
158
|
-
|
|
143
|
+
{
|
|
144
|
+
...params,
|
|
159
145
|
include: /\.([cm]js|[jt]sx?|flow|md)$/i
|
|
160
|
-
}
|
|
146
|
+
}
|
|
161
147
|
]);
|
|
162
148
|
}
|
|
163
149
|
return memo;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umijs/plugin-docs",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.22",
|
|
4
4
|
"description": "@umijs/plugin-docs",
|
|
5
5
|
"homepage": "https://github.com/umijs/umi/tree/master/packages/plugin-docs#readme",
|
|
6
6
|
"bugs": "https://github.com/umijs/umi/issues",
|
|
@@ -17,10 +17,11 @@
|
|
|
17
17
|
"compiled"
|
|
18
18
|
],
|
|
19
19
|
"scripts": {
|
|
20
|
-
"build": "
|
|
20
|
+
"build": "pnpm build:js && pnpm build:extra",
|
|
21
21
|
"build:css": "tailwindcss -i ./client/theme-doc/tailwind.css -o ./client/theme-doc/tailwind.out.css",
|
|
22
22
|
"build:deps": "umi-scripts bundleDeps",
|
|
23
23
|
"build:extra": "pnpm build:css",
|
|
24
|
+
"build:js": "umi-scripts father build",
|
|
24
25
|
"dev": "umi-scripts father dev",
|
|
25
26
|
"dev:css": "pnpm build:css --watch",
|
|
26
27
|
"test": "umi-scripts jest-turbo"
|
|
@@ -42,7 +43,7 @@
|
|
|
42
43
|
"rehype-slug": "5.0.1",
|
|
43
44
|
"remark-gfm": "^3.0.1",
|
|
44
45
|
"tailwindcss": "^3.0.24",
|
|
45
|
-
"umi": "4.0.
|
|
46
|
+
"umi": "4.0.22"
|
|
46
47
|
},
|
|
47
48
|
"publishConfig": {
|
|
48
49
|
"access": "public"
|