create-zhx-monorepo 0.1.5 → 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/bin/index.js +8 -7
- package/package.json +1 -1
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:");
|