create-fa-react 1.0.1 → 1.0.3

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/index.js CHANGED
@@ -11,7 +11,7 @@ const __dirname = path.dirname(__filename);
11
11
  const projectName = process.argv[2];
12
12
 
13
13
  if (!projectName) {
14
- console.log(pc.red("Debes proporcionar un nombre de proyecto."));
14
+ console.log(pc.red("Debes proporcionar un nombre de proyecto."));
15
15
  process.exit(1);
16
16
  }
17
17
 
@@ -19,22 +19,27 @@ const projectPath = path.join(process.cwd(), projectName);
19
19
  const templatePath = path.join(__dirname, "template");
20
20
 
21
21
  if (fs.existsSync(projectPath)) {
22
- console.log(pc.red("La carpeta ya existe."));
22
+ console.log(pc.red("La carpeta ya existe."));
23
23
  process.exit(1);
24
24
  }
25
25
 
26
- console.log(pc.cyan("📦 Creando proyecto...\n"));
26
+ console.log(pc.cyan("Creando proyecto...\n"));
27
27
 
28
- // crear carpeta
29
28
  fs.mkdirSync(projectPath);
30
29
 
31
- // copiar template
32
- fs.cpSync(templatePath, projectPath, { recursive: true });
30
+ const files = fs.readdirSync(templatePath);
33
31
 
34
- console.log(pc.green("✅ Proyecto creado correctamente.\n"));
32
+ for (const file of files) {
33
+ fs.cpSync(
34
+ path.join(templatePath, file),
35
+ path.join(projectPath, file),
36
+ { recursive: true }
37
+ );
38
+ }
39
+
40
+ console.log(pc.green("Proyecto creado correctamente!\n"));
35
41
 
36
- console.log(pc.bold("Siguientes pasos:"));
37
- console.log(pc.cyan(` cd ${projectName}`));
38
- console.log(pc.cyan(" npm install or pnpm instal"));
39
- console.log(pc.cyan(" npm run dev or pnpm dev"));
40
- console.log("");
42
+ console.log(pc.yellow("Siguientes pasos:"));
43
+ console.log(pc.white(` cd ${projectName}`));
44
+ console.log(pc.white(" npm install"));
45
+ console.log(pc.white(" npm run dev"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-fa-react",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Create a react template using feature architecture",
5
5
  "main": "index.js",
6
6
  "type": "module",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes