react-mfe-gen 1.0.6 → 1.0.8
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/README.md +7 -6
- package/creation/container-creation.js +3 -1
- package/creation/new-pro-creation.js +6 -2
- package/creation/single-mfe-creation.js +4 -2
- package/package.json +12 -4
- package/utility.js +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# react-mfe-gen
|
|
1
|
+
# 🏗️ React Microfront end generator (react-mfe-gen)
|
|
2
2
|
|
|
3
3
|
react-mfe-gen is a CLI tool that helps you quickly scaffold a base setup for React Micro-Frontend (MFE) architecture.
|
|
4
4
|
|
|
@@ -6,10 +6,11 @@ This tool uses the Runtime Integration approach — meaning each MFE is built as
|
|
|
6
6
|
|
|
7
7
|
## 🚀 Features:
|
|
8
8
|
|
|
9
|
-
- Quickly set up a React
|
|
9
|
+
- Quickly set up a React microfront end base project.
|
|
10
10
|
- Follows Runtime Integration best practices.
|
|
11
|
-
-
|
|
12
|
-
-
|
|
11
|
+
- Outputs ready-to-execute code with fully dynamic, seamlessly integrated components..
|
|
12
|
+
- Dynamically installs additional libraries based on user choices, such as state management, styling, and form handling.
|
|
13
|
+
- Automatically cleans up any incomplete code if an unexpected issue occurs during the process.
|
|
13
14
|
|
|
14
15
|
## 📦 Prerequisites:
|
|
15
16
|
|
|
@@ -21,6 +22,6 @@ Node.js installed (latest LTS recommended).
|
|
|
21
22
|
`npm install -g react-mfe-gen`
|
|
22
23
|
|
|
23
24
|
- Run the CLI
|
|
24
|
-
`react-mfe
|
|
25
|
+
`create-react-mfe`
|
|
25
26
|
|
|
26
|
-
-
|
|
27
|
+
- Answer the prompts to generate your project, container, or micro-frontend.
|
|
@@ -41,7 +41,9 @@ const containerCreation = async (language) => {
|
|
|
41
41
|
]);
|
|
42
42
|
|
|
43
43
|
// store working dir
|
|
44
|
-
wrokingDirectories.push(
|
|
44
|
+
wrokingDirectories.push(
|
|
45
|
+
`${commonInfo.containerPath}\\${containerName}`
|
|
46
|
+
);
|
|
45
47
|
|
|
46
48
|
// Go inside user specified dir
|
|
47
49
|
process.chdir(commonInfo.containerPath);
|
|
@@ -47,7 +47,9 @@ const newProjectCreation = async (language) => {
|
|
|
47
47
|
]);
|
|
48
48
|
|
|
49
49
|
// store working dir
|
|
50
|
-
wrokingDirectories.push(
|
|
50
|
+
wrokingDirectories.push(
|
|
51
|
+
`${commonInfo.containerPath}\\${projectInfo.projectName}`
|
|
52
|
+
);
|
|
51
53
|
// Go inside user specified dir
|
|
52
54
|
process.chdir(commonInfo.containerPath);
|
|
53
55
|
|
|
@@ -82,7 +84,9 @@ const newProjectCreation = async (language) => {
|
|
|
82
84
|
...PROMPT.COMMON,
|
|
83
85
|
]);
|
|
84
86
|
// store working dir
|
|
85
|
-
wrokingDirectories.push(
|
|
87
|
+
wrokingDirectories.push(
|
|
88
|
+
`${mfeInfo.path}\\${mfeName}`
|
|
89
|
+
);
|
|
86
90
|
// Go inside user specified mfe dir
|
|
87
91
|
process.chdir(mfeInfo.path);
|
|
88
92
|
const mfeAppCommand = utils.getLanguageTemplate(mfeName, isTypeScript);
|
|
@@ -19,8 +19,10 @@ const singleMfeCreation = async (language) => {
|
|
|
19
19
|
PROMPT.CONDITIONAL.FORM_MANAGEMENT,
|
|
20
20
|
]);
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
wrokingDirectories.push(
|
|
22
|
+
// store working dir
|
|
23
|
+
wrokingDirectories.push(
|
|
24
|
+
`${mfeInfo.mfePath}\\${mfeName}`
|
|
25
|
+
);
|
|
24
26
|
|
|
25
27
|
// Go inside user specified dir
|
|
26
28
|
process.chdir(mfeInfo.mfePath);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-mfe-gen",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.0.8",
|
|
4
|
+
"description": "Generate React micro-frontends, containers, and projects using a simple CLI with runtime integration support.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
@@ -26,13 +26,21 @@
|
|
|
26
26
|
"access": "public"
|
|
27
27
|
},
|
|
28
28
|
"bin": {
|
|
29
|
-
"react-mfe
|
|
29
|
+
"create-react-mfe": "./index.js"
|
|
30
30
|
},
|
|
31
31
|
"keywords": [
|
|
32
32
|
"react",
|
|
33
33
|
"microfrontend",
|
|
34
|
+
"micro-frontend",
|
|
34
35
|
"mfe",
|
|
35
36
|
"cli",
|
|
36
|
-
"generator"
|
|
37
|
+
"generator",
|
|
38
|
+
"react-cli",
|
|
39
|
+
"project-generator",
|
|
40
|
+
"react-microfrontend",
|
|
41
|
+
"microfrontend-generator",
|
|
42
|
+
"react-setup",
|
|
43
|
+
"react-boilerplate",
|
|
44
|
+
"runtime-integration"
|
|
37
45
|
]
|
|
38
46
|
}
|
package/utility.js
CHANGED
|
@@ -162,7 +162,7 @@ class utils {
|
|
|
162
162
|
// Create readme
|
|
163
163
|
await writeFile("README.md", `# ${projectName}\n${projectDescription}`);
|
|
164
164
|
|
|
165
|
-
console.log(`${projectName} created
|
|
165
|
+
console.log(`${projectName} created ✅\n`);
|
|
166
166
|
}
|
|
167
167
|
static async configureMfe(info, mfeName, index) {
|
|
168
168
|
// Destructure inputs
|