@docusaurus/core 0.0.0-4676 → 0.0.0-4679

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.
@@ -123,7 +123,7 @@ async function buildLocale({ siteDir, locale, cliOptions, forceTerminate, isLast
123
123
  plugins.forEach((plugin) => {
124
124
  const { configureWebpack, configurePostCss } = plugin;
125
125
  if (configurePostCss) {
126
- clientConfig = (0, utils_1.applyConfigurePostCss)(configurePostCss, clientConfig);
126
+ clientConfig = (0, utils_1.applyConfigurePostCss)(configurePostCss.bind(plugin), clientConfig);
127
127
  }
128
128
  if (configureWebpack) {
129
129
  clientConfig = (0, utils_1.applyConfigureWebpack)(configureWebpack.bind(plugin), // The plugin lifecycle may reference `this`.
@@ -15,11 +15,7 @@ async function externalCommand(cli, siteDir) {
15
15
  const plugins = await (0, init_1.default)({ pluginConfigs, context });
16
16
  // Plugin Lifecycle - extendCli.
17
17
  plugins.forEach((plugin) => {
18
- const { extendCli } = plugin;
19
- if (!extendCli) {
20
- return;
21
- }
22
- extendCli(cli);
18
+ plugin.extendCli?.(cli);
23
19
  });
24
20
  }
25
21
  exports.default = externalCommand;
@@ -116,10 +116,10 @@ async function start(siteDir, cliOptions) {
116
116
  plugins.forEach((plugin) => {
117
117
  const { configureWebpack, configurePostCss } = plugin;
118
118
  if (configurePostCss) {
119
- config = (0, utils_2.applyConfigurePostCss)(configurePostCss, config);
119
+ config = (0, utils_2.applyConfigurePostCss)(configurePostCss.bind(plugin), config);
120
120
  }
121
121
  if (configureWebpack) {
122
- config = (0, utils_2.applyConfigureWebpack)(configureWebpack.bind(plugin), // The plugin lifecycle may reference `this`. // TODO remove this implicit api: inject in callback instead
122
+ config = (0, utils_2.applyConfigureWebpack)(configureWebpack.bind(plugin), // The plugin lifecycle may reference `this`.
123
123
  config, false, props.siteConfig.webpack?.jsLoader, plugin.content);
124
124
  }
125
125
  });
@@ -49,7 +49,7 @@ Report it here: https://github.com/facebook/docusaurus/discussions/5468
49
49
  [tableStatusLabel('forbidden')]: [
50
50
  '',
51
51
  `
52
- This component should not meant to be swizzled.
52
+ This component is not meant to be swizzled.
53
53
  `,
54
54
  ],
55
55
  });
@@ -66,7 +66,7 @@ function actionsTable() {
66
66
  Creates a wrapper around the original theme component.
67
67
  Allows rendering other components before/after the original theme component.
68
68
 
69
- ${logger_1.default.green('Tip')}: prefer ${logger_1.default.code('--wrap')} whenever possible to reduces the amount of code to maintain.
69
+ ${logger_1.default.green('Tip')}: prefer ${logger_1.default.code('--wrap')} whenever possible to reduce the amount of code to maintain.
70
70
  `,
71
71
  ],
72
72
  });
@@ -75,9 +75,9 @@ ${logger_1.default.green('Tip')}: prefer ${logger_1.default.code('--wrap')} when
75
75
  logger_1.default.code('--eject'),
76
76
  `
77
77
  Ejects the full source code of the original theme component.
78
- Allows overriding the original component entirely with your own UI and logic.
78
+ Allows overriding of the original component entirely with your own UI and logic.
79
79
 
80
- ${logger_1.default.green('Tip')}: ${logger_1.default.code('--eject')} can be useful to completely redesign a component.
80
+ ${logger_1.default.green('Tip')}: ${logger_1.default.code('--eject')} can be useful for completely redesigning a component.
81
81
  `,
82
82
  ],
83
83
  });
@@ -39,7 +39,7 @@ async function loadThemeAliases(themePaths, userThemePaths) {
39
39
  exports.loadThemeAliases = loadThemeAliases;
40
40
  function loadPluginsThemeAliases({ siteDir, plugins, }) {
41
41
  const pluginThemes = plugins
42
- .map((plugin) => (plugin.getThemePath ? plugin.getThemePath() : undefined))
42
+ .map((plugin) => plugin.getThemePath?.())
43
43
  .filter((x) => Boolean(x));
44
44
  const userTheme = path_1.default.resolve(siteDir, utils_1.THEME_PATH);
45
45
  return loadThemeAliases([ThemeFallbackDir, ...pluginThemes], [userTheme]);
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-4676",
4
+ "version": "0.0.0-4679",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -41,13 +41,13 @@
41
41
  "@babel/runtime": "^7.17.2",
42
42
  "@babel/runtime-corejs3": "^7.17.2",
43
43
  "@babel/traverse": "^7.17.3",
44
- "@docusaurus/cssnano-preset": "0.0.0-4676",
45
- "@docusaurus/logger": "0.0.0-4676",
46
- "@docusaurus/mdx-loader": "0.0.0-4676",
44
+ "@docusaurus/cssnano-preset": "0.0.0-4679",
45
+ "@docusaurus/logger": "0.0.0-4679",
46
+ "@docusaurus/mdx-loader": "0.0.0-4679",
47
47
  "@docusaurus/react-loadable": "5.5.2",
48
- "@docusaurus/utils": "0.0.0-4676",
49
- "@docusaurus/utils-common": "0.0.0-4676",
50
- "@docusaurus/utils-validation": "0.0.0-4676",
48
+ "@docusaurus/utils": "0.0.0-4679",
49
+ "@docusaurus/utils-common": "0.0.0-4679",
50
+ "@docusaurus/utils-validation": "0.0.0-4679",
51
51
  "@slorber/static-site-generator-webpack-plugin": "^4.0.1",
52
52
  "@svgr/webpack": "^6.2.1",
53
53
  "autoprefixer": "^10.4.2",
@@ -106,8 +106,8 @@
106
106
  "webpackbar": "^5.0.2"
107
107
  },
108
108
  "devDependencies": {
109
- "@docusaurus/module-type-aliases": "0.0.0-4676",
110
- "@docusaurus/types": "0.0.0-4676",
109
+ "@docusaurus/module-type-aliases": "0.0.0-4679",
110
+ "@docusaurus/types": "0.0.0-4679",
111
111
  "@types/detect-port": "^1.3.2",
112
112
  "@types/nprogress": "^0.2.0",
113
113
  "@types/react-dom": "^17.0.11",
@@ -128,5 +128,5 @@
128
128
  "engines": {
129
129
  "node": ">=14"
130
130
  },
131
- "gitHead": "47f19c51bb30b6bb9498cb50fdadb68b7743cccb"
131
+ "gitHead": "446224a0b9b4f91bb8676d85518b5d7af0221044"
132
132
  }