@xrystal/core 3.7.8 ā 3.7.9
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/main-cli.js +5 -6
- package/package.json +1 -1
package/bin/main-cli.js
CHANGED
|
@@ -63,7 +63,8 @@ const setupCLI = async () => {
|
|
|
63
63
|
const isCurrentDir = projectName === "."
|
|
64
64
|
|
|
65
65
|
if (targetDir) {
|
|
66
|
-
|
|
66
|
+
const baseDir = path.resolve(process.cwd(), targetDir)
|
|
67
|
+
targetPath = isCurrentDir ? baseDir : path.join(baseDir, projectName)
|
|
67
68
|
} else {
|
|
68
69
|
targetPath = isCurrentDir ? process.cwd() : path.resolve(process.cwd(), projectName)
|
|
69
70
|
}
|
|
@@ -90,14 +91,12 @@ const setupCLI = async () => {
|
|
|
90
91
|
try {
|
|
91
92
|
execSync(`git init`, { cwd: targetPath, stdio: "ignore" })
|
|
92
93
|
} catch (e) {
|
|
93
|
-
// Failed silently
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
spinner.succeed(chalk.green("Template cloned and git initialized!"))
|
|
97
|
-
console.log(chalk.blue(`\nš¦ Installing dependencies with
|
|
97
|
+
console.log(chalk.blue(`\nš¦ Installing dependencies with bun...`))
|
|
98
98
|
|
|
99
|
-
|
|
100
|
-
execSync(installCmd, { cwd: targetPath, stdio: "inherit" })
|
|
99
|
+
execSync("bun install", { cwd: targetPath, stdio: "inherit" })
|
|
101
100
|
|
|
102
101
|
console.log(chalk.green("\nā
Done!"))
|
|
103
102
|
|
|
@@ -106,7 +105,7 @@ const setupCLI = async () => {
|
|
|
106
105
|
console.log(chalk.cyan(`\n cd ${relativePath}`))
|
|
107
106
|
}
|
|
108
107
|
|
|
109
|
-
console.log(chalk.cyan(`
|
|
108
|
+
console.log(chalk.cyan(` bun run dev`))
|
|
110
109
|
|
|
111
110
|
} catch (err) {
|
|
112
111
|
spinner.fail(chalk.red("Failed!"))
|