@docusaurus/core 0.0.0-6036 → 0.0.0-6040

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.
@@ -10,4 +10,4 @@ export type BuildCLIOptions = Pick<LoadContextParams, 'config' | 'locale' | 'out
10
10
  minify?: boolean;
11
11
  dev?: boolean;
12
12
  };
13
- export declare function build(siteDirParam?: string, cliOptions?: Partial<BuildCLIOptions>, forceTerminate?: boolean): Promise<void>;
13
+ export declare function build(siteDirParam?: string, cliOptions?: Partial<BuildCLIOptions>): Promise<void>;
@@ -24,12 +24,7 @@ const i18n_1 = require("../server/i18n");
24
24
  const ssg_1 = require("../ssg");
25
25
  const templates_1 = require("../templates/templates");
26
26
  const ssr_html_template_1 = tslib_1.__importDefault(require("../templates/ssr.html.template"));
27
- async function build(siteDirParam = '.', cliOptions = {},
28
- // When running build, we force terminate the process to prevent async
29
- // operations from never returning. However, if run as part of docusaurus
30
- // deploy, we have to let deploy finish.
31
- // See https://github.com/facebook/docusaurus/pull/2496
32
- forceTerminate = true) {
27
+ async function build(siteDirParam = '.', cliOptions = {}) {
33
28
  process.env.BABEL_ENV = 'production';
34
29
  process.env.NODE_ENV = 'production';
35
30
  process.env.DOCUSAURUS_CURRENT_LOCALE = cliOptions.locale;
@@ -61,16 +56,9 @@ forceTerminate = true) {
61
56
  logger_1.default.info `Website will be built for all these locales: ${locales}`;
62
57
  }
63
58
  await utils_3.PerfLogger.async(`Build`, () => (0, utils_1.mapAsyncSequential)(locales, async (locale) => {
64
- const isLastLocale = locales.indexOf(locale) === locales.length - 1;
65
59
  await tryToBuildLocale({ locale });
66
- if (isLastLocale) {
67
- logger_1.default.info `Use code=${'npm run serve'} command to test your build locally.`;
68
- }
69
- // TODO do we really need this historical forceTerminate exit???
70
- if (forceTerminate && isLastLocale && !cliOptions.bundleAnalyzer) {
71
- process.exit(0);
72
- }
73
60
  }));
61
+ logger_1.default.info `Use code=${'npm run serve'} command to test your build locally.`;
74
62
  }
75
63
  async function getLocalesToBuild({ siteDir, cliOptions, }) {
76
64
  if (cliOptions.locale) {
@@ -183,7 +183,7 @@ You can also set the deploymentBranch property in docusaurus.config.js .`);
183
183
  if (!cliOptions.skipBuild) {
184
184
  // Build site, then push to deploymentBranch branch of specified repo.
185
185
  try {
186
- await (0, build_1.build)(siteDir, cliOptions, false);
186
+ await (0, build_1.build)(siteDir, cliOptions);
187
187
  await runDeploy(outDir);
188
188
  }
189
189
  catch (err) {
@@ -33,7 +33,7 @@ async function serve(siteDirParam = '.', cliOptions = {}) {
33
33
  await (0, build_1.build)(siteDir, {
34
34
  config: cliOptions.config,
35
35
  outDir,
36
- }, false);
36
+ });
37
37
  }
38
38
  const { host, port } = await (0, getHostPort_1.getHostPort)(cliOptions);
39
39
  if (port === null) {
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-6036",
4
+ "version": "0.0.0-6040",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -43,12 +43,12 @@
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-6036",
47
- "@docusaurus/logger": "0.0.0-6036",
48
- "@docusaurus/mdx-loader": "0.0.0-6036",
49
- "@docusaurus/utils": "0.0.0-6036",
50
- "@docusaurus/utils-common": "0.0.0-6036",
51
- "@docusaurus/utils-validation": "0.0.0-6036",
46
+ "@docusaurus/cssnano-preset": "0.0.0-6040",
47
+ "@docusaurus/logger": "0.0.0-6040",
48
+ "@docusaurus/mdx-loader": "0.0.0-6040",
49
+ "@docusaurus/utils": "0.0.0-6040",
50
+ "@docusaurus/utils-common": "0.0.0-6040",
51
+ "@docusaurus/utils-validation": "0.0.0-6040",
52
52
  "autoprefixer": "^10.4.14",
53
53
  "babel-loader": "^9.1.3",
54
54
  "babel-plugin-dynamic-import-node": "^2.3.3",
@@ -103,8 +103,8 @@
103
103
  "webpackbar": "^5.0.2"
104
104
  },
105
105
  "devDependencies": {
106
- "@docusaurus/module-type-aliases": "0.0.0-6036",
107
- "@docusaurus/types": "0.0.0-6036",
106
+ "@docusaurus/module-type-aliases": "0.0.0-6040",
107
+ "@docusaurus/types": "0.0.0-6040",
108
108
  "@total-typescript/shoehorn": "^0.1.2",
109
109
  "@types/detect-port": "^1.3.3",
110
110
  "@types/react-dom": "^18.2.7",
@@ -125,5 +125,5 @@
125
125
  "engines": {
126
126
  "node": ">=18.0"
127
127
  },
128
- "gitHead": "bc3568531c25e19f64aba2bb83f8dc9cfbbb59f3"
128
+ "gitHead": "cfa9397abf54b8d7e433c53d4f2eb2ce3b5846b3"
129
129
  }