@docusaurus/core 0.0.0-4992 → 0.0.0-4993

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.
@@ -43,19 +43,17 @@ async function eject({ siteDir, themePath, componentName, }) {
43
43
  // This should never happen
44
44
  throw new Error(logger_1.default.interpolate `No files to copy from path=${fromPath} with glob code=${globPatternPosix}`);
45
45
  }
46
- const toPath = isDirectory
47
- ? path_1.default.join(siteDir, utils_1.THEME_PATH, componentName)
48
- : path_1.default.join(siteDir, utils_1.THEME_PATH);
46
+ const toPath = path_1.default.join(siteDir, utils_1.THEME_PATH);
49
47
  await fs_extra_1.default.ensureDir(toPath);
50
48
  const createdFiles = await Promise.all(filesToCopy.map(async (sourceFile) => {
51
- const fileName = path_1.default.basename(sourceFile);
52
- const targetFile = path_1.default.join(toPath, fileName);
49
+ const targetFile = path_1.default.join(toPath, path_1.default.relative(themePath, sourceFile));
53
50
  try {
54
51
  const fileContents = await fs_extra_1.default.readFile(sourceFile, 'utf-8');
55
52
  await fs_extra_1.default.outputFile(targetFile, fileContents.trimStart().replace(/^\/\*.+?\*\/\s*/ms, ''));
56
53
  }
57
54
  catch (err) {
58
- throw new Error(logger_1.default.interpolate `Could not copy file from path=${sourceFile} to path=${targetFile}`);
55
+ logger_1.default.error `Could not copy file from path=${sourceFile} to path=${targetFile}`;
56
+ throw err;
59
57
  }
60
58
  return targetFile;
61
59
  }));
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-4992",
4
+ "version": "0.0.0-4993",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -41,13 +41,13 @@
41
41
  "@babel/runtime": "^7.17.9",
42
42
  "@babel/runtime-corejs3": "^7.17.9",
43
43
  "@babel/traverse": "^7.17.10",
44
- "@docusaurus/cssnano-preset": "0.0.0-4992",
45
- "@docusaurus/logger": "0.0.0-4992",
46
- "@docusaurus/mdx-loader": "0.0.0-4992",
44
+ "@docusaurus/cssnano-preset": "0.0.0-4993",
45
+ "@docusaurus/logger": "0.0.0-4993",
46
+ "@docusaurus/mdx-loader": "0.0.0-4993",
47
47
  "@docusaurus/react-loadable": "5.5.2",
48
- "@docusaurus/utils": "0.0.0-4992",
49
- "@docusaurus/utils-common": "0.0.0-4992",
50
- "@docusaurus/utils-validation": "0.0.0-4992",
48
+ "@docusaurus/utils": "0.0.0-4993",
49
+ "@docusaurus/utils-common": "0.0.0-4993",
50
+ "@docusaurus/utils-validation": "0.0.0-4993",
51
51
  "@slorber/static-site-generator-webpack-plugin": "^4.0.4",
52
52
  "@svgr/webpack": "^6.2.1",
53
53
  "autoprefixer": "^10.4.7",
@@ -104,8 +104,8 @@
104
104
  "webpackbar": "^5.0.2"
105
105
  },
106
106
  "devDependencies": {
107
- "@docusaurus/module-type-aliases": "0.0.0-4992",
108
- "@docusaurus/types": "0.0.0-4992",
107
+ "@docusaurus/module-type-aliases": "0.0.0-4993",
108
+ "@docusaurus/types": "0.0.0-4993",
109
109
  "@types/detect-port": "^1.3.2",
110
110
  "@types/react-dom": "^18.0.3",
111
111
  "@types/react-router-config": "^5.0.6",
@@ -125,5 +125,5 @@
125
125
  "engines": {
126
126
  "node": ">=14"
127
127
  },
128
- "gitHead": "5dc4f7817f56756be7420cb7363ab78f029b38ca"
128
+ "gitHead": "f08d27902e366eda1e1b19b5e405d8811123c4e9"
129
129
  }