@docusaurus/core 0.0.0-4305 → 0.0.0-4314
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/server/config.d.ts +1 -1
- package/lib/server/config.js +5 -2
- package/package.json +10 -10
package/lib/server/config.d.ts
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import { DocusaurusConfig } from '@docusaurus/types';
|
|
8
|
-
export default function loadConfig(configPath: string): DocusaurusConfig
|
|
8
|
+
export default function loadConfig(configPath: string): Promise<DocusaurusConfig>;
|
package/lib/server/config.js
CHANGED
|
@@ -10,11 +10,14 @@ const tslib_1 = require("tslib");
|
|
|
10
10
|
const fs_extra_1 = (0, tslib_1.__importDefault)(require("fs-extra"));
|
|
11
11
|
const import_fresh_1 = (0, tslib_1.__importDefault)(require("import-fresh"));
|
|
12
12
|
const configValidation_1 = require("./configValidation");
|
|
13
|
-
function loadConfig(configPath) {
|
|
13
|
+
async function loadConfig(configPath) {
|
|
14
14
|
if (!fs_extra_1.default.existsSync(configPath)) {
|
|
15
15
|
throw new Error(`Config file at "${configPath}" not found.`);
|
|
16
16
|
}
|
|
17
|
-
const
|
|
17
|
+
const importedConfig = (0, import_fresh_1.default)(configPath);
|
|
18
|
+
const loadedConfig = importedConfig instanceof Function
|
|
19
|
+
? await importedConfig()
|
|
20
|
+
: await importedConfig;
|
|
18
21
|
return (0, configValidation_1.validateConfig)(loadedConfig);
|
|
19
22
|
}
|
|
20
23
|
exports.default = loadConfig;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/core",
|
|
3
3
|
"description": "Easy to Maintain Open Source Documentation Websites",
|
|
4
|
-
"version": "0.0.0-
|
|
4
|
+
"version": "0.0.0-4314",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -41,13 +41,13 @@
|
|
|
41
41
|
"@babel/runtime": "^7.16.3",
|
|
42
42
|
"@babel/runtime-corejs3": "^7.16.3",
|
|
43
43
|
"@babel/traverse": "^7.16.3",
|
|
44
|
-
"@docusaurus/cssnano-preset": "0.0.0-
|
|
45
|
-
"@docusaurus/logger": "0.0.0-
|
|
46
|
-
"@docusaurus/mdx-loader": "0.0.0-
|
|
44
|
+
"@docusaurus/cssnano-preset": "0.0.0-4314",
|
|
45
|
+
"@docusaurus/logger": "0.0.0-4314",
|
|
46
|
+
"@docusaurus/mdx-loader": "0.0.0-4314",
|
|
47
47
|
"@docusaurus/react-loadable": "5.5.2",
|
|
48
|
-
"@docusaurus/utils": "0.0.0-
|
|
49
|
-
"@docusaurus/utils-common": "0.0.0-
|
|
50
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
48
|
+
"@docusaurus/utils": "0.0.0-4314",
|
|
49
|
+
"@docusaurus/utils-common": "0.0.0-4314",
|
|
50
|
+
"@docusaurus/utils-validation": "0.0.0-4314",
|
|
51
51
|
"@slorber/static-site-generator-webpack-plugin": "^4.0.0",
|
|
52
52
|
"@svgr/webpack": "^6.0.0",
|
|
53
53
|
"autoprefixer": "^10.3.5",
|
|
@@ -108,8 +108,8 @@
|
|
|
108
108
|
"webpackbar": "^5.0.0-3"
|
|
109
109
|
},
|
|
110
110
|
"devDependencies": {
|
|
111
|
-
"@docusaurus/module-type-aliases": "0.0.0-
|
|
112
|
-
"@docusaurus/types": "0.0.0-
|
|
111
|
+
"@docusaurus/module-type-aliases": "0.0.0-4314",
|
|
112
|
+
"@docusaurus/types": "0.0.0-4314",
|
|
113
113
|
"@types/copy-webpack-plugin": "^8.0.1",
|
|
114
114
|
"@types/css-minimizer-webpack-plugin": "^3.0.2",
|
|
115
115
|
"@types/detect-port": "^1.3.0",
|
|
@@ -128,5 +128,5 @@
|
|
|
128
128
|
"engines": {
|
|
129
129
|
"node": ">=14"
|
|
130
130
|
},
|
|
131
|
-
"gitHead": "
|
|
131
|
+
"gitHead": "a3babffc6d8e2fb9d4f11482911cadb39eaa5f42"
|
|
132
132
|
}
|