bug fixes

This commit is contained in:
Aman Varshney
2025-02-13 22:20:07 +05:30
parent 83a5e1e22e
commit d8875f0073
5 changed files with 223 additions and 176 deletions

View File

@@ -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}`);