mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
bug fixes
This commit is contained in:
@@ -12,7 +12,7 @@ export async function createProject(options: ProjectConfig) {
|
||||
let shouldInstallDeps = false;
|
||||
|
||||
try {
|
||||
await tasks([
|
||||
const tasksList = [
|
||||
{
|
||||
title: "Creating project directory",
|
||||
task: async () => {
|
||||
@@ -33,15 +33,22 @@ export async function createProject(options: ProjectConfig) {
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
];
|
||||
|
||||
if (options.git) {
|
||||
tasksList.push({
|
||||
title: "Initializing git repository",
|
||||
task: async () => {
|
||||
if (options.git) {
|
||||
await $`git init ${projectDir}`;
|
||||
}
|
||||
await $`git init ${projectDir}`;
|
||||
},
|
||||
},
|
||||
]);
|
||||
});
|
||||
}
|
||||
|
||||
await tasks(tasksList);
|
||||
|
||||
if (options.database === "libsql") {
|
||||
await setupTurso(projectDir);
|
||||
}
|
||||
|
||||
const installDepsResponse = await confirm({
|
||||
message: `📦 Install dependencies using ${options.packageManager}?`,
|
||||
@@ -71,10 +78,6 @@ export async function createProject(options: ProjectConfig) {
|
||||
}
|
||||
}
|
||||
|
||||
if (options.database === "libsql") {
|
||||
await setupTurso(projectDir);
|
||||
}
|
||||
|
||||
log.success("✨ Project created successfully!\n");
|
||||
log.info(chalk.dim("Next steps:"));
|
||||
log.info(` cd ${options.projectName}`);
|
||||
|
||||
Reference in New Issue
Block a user