@umijs/plugin-docs 4.0.0-canary.20220412.1 → 4.0.0-canary.20220414.1
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 +3 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -98,7 +98,7 @@ exports.default = (api) => {
|
|
|
98
98
|
theme = require.resolve('../client/theme-blog/index.ts');
|
|
99
99
|
}
|
|
100
100
|
theme = (0, utils_1.winPath)(theme);
|
|
101
|
-
const themeConfigPath = (0, path_1.join)(api.cwd, 'theme.config.ts');
|
|
101
|
+
const themeConfigPath = (0, utils_1.winPath)((0, path_1.join)(api.cwd, 'theme.config.ts'));
|
|
102
102
|
const themeExists = (0, fs_1.existsSync)(themeConfigPath);
|
|
103
103
|
// 将 docs/locales 目录下的 json 文件注入到 themeConfig.locales 中
|
|
104
104
|
let injectLocale = `themeConfig.locales = ${JSON.stringify(locales)};`;
|
|
@@ -112,7 +112,7 @@ exports.default = (api) => {
|
|
|
112
112
|
content: `
|
|
113
113
|
export { ${exports
|
|
114
114
|
.filter((item) => !item.startsWith('$'))
|
|
115
|
-
.join(', ')} } from '${require.resolve('../client/theme-doc/index.ts')}';
|
|
115
|
+
.join(', ')} } from '${(0, utils_1.winPath)(require.resolve('../client/theme-doc/index.ts'))}';
|
|
116
116
|
`,
|
|
117
117
|
});
|
|
118
118
|
api.writeTmpFile({
|
|
@@ -120,7 +120,7 @@ export { ${exports
|
|
|
120
120
|
content: `
|
|
121
121
|
import React from 'react';
|
|
122
122
|
import { useOutlet, useAppData, useLocation, Link } from 'umi';
|
|
123
|
-
import { $Layout as Layout } from '${require.resolve('../client/theme-doc/index.ts')}';
|
|
123
|
+
import { $Layout as Layout } from '${(0, utils_1.winPath)(require.resolve('../client/theme-doc/index.ts'))}';
|
|
124
124
|
${themeExists
|
|
125
125
|
? `import themeConfig from '${themeConfigPath}'`
|
|
126
126
|
: `const themeConfig = {}`}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umijs/plugin-docs",
|
|
3
|
-
"version": "4.0.0-canary.
|
|
3
|
+
"version": "4.0.0-canary.20220414.1",
|
|
4
4
|
"description": "@umijs/plugin-docs",
|
|
5
5
|
"homepage": "https://github.com/umijs/umi-next/tree/master/packages/plugin-docs#readme",
|
|
6
6
|
"bugs": "https://github.com/umijs/umi-next/issues",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"classnames": "^2.3.1",
|
|
36
36
|
"rehype-slug": "5.0.1",
|
|
37
37
|
"tailwindcss": "^3.0.23",
|
|
38
|
-
"umi": "4.0.0-canary.
|
|
38
|
+
"umi": "4.0.0-canary.20220414.1"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|