@docusaurus/core 0.0.0-5780 → 0.0.0-5784
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/bin/docusaurus.mjs +24 -4
- package/package.json +10 -10
package/bin/docusaurus.mjs
CHANGED
|
@@ -218,6 +218,9 @@ cli.arguments('<command>').action((cmd) => {
|
|
|
218
218
|
logger.error` Unknown command name=${cmd}.`;
|
|
219
219
|
});
|
|
220
220
|
|
|
221
|
+
// === The above is the commander configuration ===
|
|
222
|
+
// They don't start any code execution yet until cli.parse() is called below
|
|
223
|
+
|
|
221
224
|
/**
|
|
222
225
|
* @param {string | undefined} command
|
|
223
226
|
*/
|
|
@@ -237,12 +240,29 @@ function isInternalCommand(command) {
|
|
|
237
240
|
);
|
|
238
241
|
}
|
|
239
242
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
+
// process.argv always looks like this:
|
|
244
|
+
// [
|
|
245
|
+
// '/path/to/node',
|
|
246
|
+
// '/path/to/docusaurus.mjs',
|
|
247
|
+
// '<subcommand>',
|
|
248
|
+
// ...subcommandArgs
|
|
249
|
+
// ]
|
|
243
250
|
|
|
244
|
-
|
|
251
|
+
// There is no subcommand
|
|
252
|
+
// TODO: can we use commander to handle this case?
|
|
253
|
+
if (process.argv.length < 3 || process.argv[2]?.startsWith('--')) {
|
|
245
254
|
cli.outputHelp();
|
|
255
|
+
process.exit(1);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
// There is an unrecognized subcommand
|
|
259
|
+
// Let plugins extend the CLI before parsing
|
|
260
|
+
if (!isInternalCommand(process.argv[2])) {
|
|
261
|
+
// TODO: in this step, we must assume default site structure because there's
|
|
262
|
+
// no way to know the siteDir/config yet. Maybe the root cli should be
|
|
263
|
+
// responsible for parsing these arguments?
|
|
264
|
+
// https://github.com/facebook/docusaurus/issues/8903
|
|
265
|
+
await externalCommand(cli);
|
|
246
266
|
}
|
|
247
267
|
|
|
248
268
|
cli.parse(process.argv);
|
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-5784",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
"@babel/runtime": "^7.22.6",
|
|
44
44
|
"@babel/runtime-corejs3": "^7.22.6",
|
|
45
45
|
"@babel/traverse": "^7.22.8",
|
|
46
|
-
"@docusaurus/cssnano-preset": "0.0.0-
|
|
47
|
-
"@docusaurus/logger": "0.0.0-
|
|
48
|
-
"@docusaurus/mdx-loader": "0.0.0-
|
|
46
|
+
"@docusaurus/cssnano-preset": "0.0.0-5784",
|
|
47
|
+
"@docusaurus/logger": "0.0.0-5784",
|
|
48
|
+
"@docusaurus/mdx-loader": "0.0.0-5784",
|
|
49
49
|
"@docusaurus/react-loadable": "5.5.2",
|
|
50
|
-
"@docusaurus/utils": "0.0.0-
|
|
51
|
-
"@docusaurus/utils-common": "0.0.0-
|
|
52
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
50
|
+
"@docusaurus/utils": "0.0.0-5784",
|
|
51
|
+
"@docusaurus/utils-common": "0.0.0-5784",
|
|
52
|
+
"@docusaurus/utils-validation": "0.0.0-5784",
|
|
53
53
|
"@slorber/static-site-generator-webpack-plugin": "^4.0.7",
|
|
54
54
|
"@svgr/webpack": "^6.5.1",
|
|
55
55
|
"autoprefixer": "^10.4.14",
|
|
@@ -104,8 +104,8 @@
|
|
|
104
104
|
"webpackbar": "^5.0.2"
|
|
105
105
|
},
|
|
106
106
|
"devDependencies": {
|
|
107
|
-
"@docusaurus/module-type-aliases": "0.0.0-
|
|
108
|
-
"@docusaurus/types": "0.0.0-
|
|
107
|
+
"@docusaurus/module-type-aliases": "0.0.0-5784",
|
|
108
|
+
"@docusaurus/types": "0.0.0-5784",
|
|
109
109
|
"@types/detect-port": "^1.3.3",
|
|
110
110
|
"@types/react-dom": "^18.2.7",
|
|
111
111
|
"@types/react-router-config": "^5.0.7",
|
|
@@ -124,5 +124,5 @@
|
|
|
124
124
|
"engines": {
|
|
125
125
|
"node": ">=18.0"
|
|
126
126
|
},
|
|
127
|
-
"gitHead": "
|
|
127
|
+
"gitHead": "8fb279c979deb0d11719f85c482fb301c4548314"
|
|
128
128
|
}
|