react-mfe-gen 1.0.6 → 1.0.7

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 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 MFE base project.
9
+ - Quickly set up a React microfront end base project.
10
10
  - Follows Runtime Integration best practices.
11
- - Generates Web Components for seamless runtime integration.
12
- - Easy to use and beginner-friendly.
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-gen`
25
+ `create-react-mfe`
25
26
 
26
- - Follow the prompts to generate your project or container.
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(commonInfo.containerPath);
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(commonInfo.containerPath);
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(mfeInfo.path);
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
- // store working dir
23
- wrokingDirectories.push(mfeInfo.mfePath);
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,6 +1,6 @@
1
1
  {
2
2
  "name": "react-mfe-gen",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "CLI tool for react Microfront end initial setup",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -26,7 +26,7 @@
26
26
  "access": "public"
27
27
  },
28
28
  "bin": {
29
- "react-mfe-gen": "./index.js"
29
+ "create-react-mfe": "./index.js"
30
30
  },
31
31
  "keywords": [
32
32
  "react",
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