@docusaurus/core 0.0.0-5201 → 0.0.0-5204
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.
|
@@ -12,12 +12,12 @@ export declare type ActionParams = {
|
|
|
12
12
|
siteDir: string;
|
|
13
13
|
themePath: string;
|
|
14
14
|
componentName: string;
|
|
15
|
+
typescript: boolean;
|
|
15
16
|
};
|
|
16
17
|
export declare type ActionResult = {
|
|
17
18
|
createdFiles: string[];
|
|
18
19
|
};
|
|
19
|
-
export declare function eject({ siteDir, themePath, componentName, }: ActionParams): Promise<ActionResult>;
|
|
20
|
+
export declare function eject({ siteDir, themePath, componentName, typescript, }: ActionParams): Promise<ActionResult>;
|
|
20
21
|
export declare function wrap({ siteDir, themePath, componentName: themeComponentName, typescript, importType, }: ActionParams & {
|
|
21
|
-
typescript: boolean;
|
|
22
22
|
importType?: 'original' | 'init';
|
|
23
23
|
}): Promise<ActionResult>;
|
|
@@ -28,7 +28,7 @@ exports.getAction = getAction;
|
|
|
28
28
|
async function isDir(dirPath) {
|
|
29
29
|
return ((await fs_extra_1.default.pathExists(dirPath)) && (await fs_extra_1.default.stat(dirPath)).isDirectory());
|
|
30
30
|
}
|
|
31
|
-
async function eject({ siteDir, themePath, componentName, }) {
|
|
31
|
+
async function eject({ siteDir, themePath, componentName, typescript, }) {
|
|
32
32
|
const fromPath = path_1.default.join(themePath, componentName);
|
|
33
33
|
const isDirectory = await isDir(fromPath);
|
|
34
34
|
const globPattern = isDirectory
|
|
@@ -37,7 +37,12 @@ async function eject({ siteDir, themePath, componentName, }) {
|
|
|
37
37
|
: `${fromPath}.*`;
|
|
38
38
|
const globPatternPosix = (0, utils_1.posixPath)(globPattern);
|
|
39
39
|
const filesToCopy = await (0, utils_1.Globby)(globPatternPosix, {
|
|
40
|
-
ignore: [
|
|
40
|
+
ignore: lodash_1.default.compact([
|
|
41
|
+
'**/*.{story,stories,test,tests}.{js,jsx,ts,tsx}',
|
|
42
|
+
// When ejecting JS components, we want to avoid emitting TS files
|
|
43
|
+
// In particular the .d.ts files that theme build output contains
|
|
44
|
+
typescript ? null : '**/*.{d.ts,ts,tsx}',
|
|
45
|
+
]),
|
|
41
46
|
});
|
|
42
47
|
if (filesToCopy.length === 0) {
|
|
43
48
|
// This should never happen
|
|
@@ -102,6 +102,7 @@ Created wrapper of name=${componentName} from name=${themeName} in path=${result
|
|
|
102
102
|
siteDir,
|
|
103
103
|
themePath,
|
|
104
104
|
componentName,
|
|
105
|
+
typescript,
|
|
105
106
|
});
|
|
106
107
|
logger_1.default.success `
|
|
107
108
|
Ejected name=${componentName} from name=${themeName} to path=${result.createdFiles}
|
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-5204",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
"@babel/runtime": "^7.18.6",
|
|
44
44
|
"@babel/runtime-corejs3": "^7.18.6",
|
|
45
45
|
"@babel/traverse": "^7.18.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-5204",
|
|
47
|
+
"@docusaurus/logger": "0.0.0-5204",
|
|
48
|
+
"@docusaurus/mdx-loader": "0.0.0-5204",
|
|
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-5204",
|
|
51
|
+
"@docusaurus/utils-common": "0.0.0-5204",
|
|
52
|
+
"@docusaurus/utils-validation": "0.0.0-5204",
|
|
53
53
|
"@slorber/static-site-generator-webpack-plugin": "^4.0.7",
|
|
54
54
|
"@svgr/webpack": "^6.2.1",
|
|
55
55
|
"autoprefixer": "^10.4.7",
|
|
@@ -106,8 +106,8 @@
|
|
|
106
106
|
"webpackbar": "^5.0.2"
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
|
-
"@docusaurus/module-type-aliases": "0.0.0-
|
|
110
|
-
"@docusaurus/types": "0.0.0-
|
|
109
|
+
"@docusaurus/module-type-aliases": "0.0.0-5204",
|
|
110
|
+
"@docusaurus/types": "0.0.0-5204",
|
|
111
111
|
"@types/detect-port": "^1.3.2",
|
|
112
112
|
"@types/react-dom": "^18.0.6",
|
|
113
113
|
"@types/react-router-config": "^5.0.6",
|
|
@@ -127,5 +127,5 @@
|
|
|
127
127
|
"engines": {
|
|
128
128
|
"node": ">=16.14"
|
|
129
129
|
},
|
|
130
|
-
"gitHead": "
|
|
130
|
+
"gitHead": "471be6d625df80c910ded93b3978751e1f66468f"
|
|
131
131
|
}
|