create-zhx-monorepo 0.1.4 → 0.1.6

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
@@ -14,7 +14,7 @@ pnpm create zhx-monorepo my-new-project
14
14
 
15
15
  # Using pnpm dlx
16
16
  pnpm dlx create-zhx-monorepo my-new-project
17
-
17
+ ```
18
18
 
19
19
  This will generate a ready-to-use monorepo under `my-new-project` with:
20
20
 
@@ -34,4 +34,3 @@ This will generate a ready-to-use monorepo under `my-new-project` with:
34
34
  ---
35
35
 
36
36
  Made with ❤️ by **JZ Digital Labs**
37
- ```
package/bin/index.js CHANGED
@@ -53,6 +53,14 @@ async function main() {
53
53
  pkg.name = targetDir;
54
54
  await fs.writeJson(pkgPath, pkg, { spaces: 2 });
55
55
 
56
+ // rename gitignore to .gitignore
57
+ const gitignoreSrc = path.join(projectPath, "gitignore");
58
+ const gitignoreDest = path.join(projectPath, ".gitignore");
59
+
60
+ if (fs.existsSync(gitignoreSrc)) {
61
+ fs.renameSync(gitignoreSrc, gitignoreDest);
62
+ }
63
+
56
64
  // Init git
57
65
  process.chdir(projectPath);
58
66
  execSync("git init", { stdio: "ignore" });
@@ -63,13 +71,6 @@ async function main() {
63
71
  execSync(`git remote add origin ${gitRemote}`, { stdio: "ignore" });
64
72
  }
65
73
 
66
- const gitignoreSrc = path.join(projectPath, "gitignore");
67
- const gitignoreDest = path.join(projectPath, ".gitignore");
68
-
69
- if (fs.existsSync(gitignoreSrc)) {
70
- fs.renameSync(gitignoreSrc, gitignoreDest);
71
- }
72
-
73
74
  console.log(green("✅ Project ready!"));
74
75
  console.log();
75
76
  console.log("Next steps:");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-zhx-monorepo",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Create a ZHX monorepo with one command",
5
5
  "bin": {
6
6
  "create-zhx-monorepo": "bin/index.js"