diff --git a/.changeset/wild-tools-flash.md b/.changeset/wild-tools-flash.md new file mode 100644 index 0000000..5895635 --- /dev/null +++ b/.changeset/wild-tools-flash.md @@ -0,0 +1,5 @@ +--- +"create-better-t-stack": patch +--- + +remove logger and fix minor bugs diff --git a/apps/cli/src/index.ts b/apps/cli/src/index.ts index ccf6020..aa93970 100644 --- a/apps/cli/src/index.ts +++ b/apps/cli/src/index.ts @@ -3,7 +3,6 @@ import { confirm, group, intro, - isCancel, multiselect, outro, select, @@ -24,11 +23,10 @@ import type { import { generateReproducibleCommand } from "./utils/generate-reproducible-command"; import { getUserPkgManager } from "./utils/get-package-manager"; import { getVersion } from "./utils/get-version"; -import { logger } from "./utils/logger"; process.on("SIGINT", () => { console.log("\n"); - logger.warn("Operation cancelled"); + chalk.red("Operation cancelled"); process.exit(0); }); @@ -42,6 +40,7 @@ async function gatherConfig( text({ message: "📝 Project name", placeholder: "my-better-t-app", + defaultValue: flags.projectName || "my-better-t-app", validate: (value) => { if (!value) return "Project name is required"; }, diff --git a/apps/cli/src/utils/logger.ts b/apps/cli/src/utils/logger.ts deleted file mode 100644 index e170575..0000000 --- a/apps/cli/src/utils/logger.ts +++ /dev/null @@ -1,16 +0,0 @@ -import chalk from "chalk"; - -export const logger = { - error(...args: unknown[]) { - console.log(chalk.red(...args)); - }, - warn(...args: unknown[]) { - console.log(chalk.yellow(...args)); - }, - info(...args: unknown[]) { - console.log(chalk.cyan(...args)); - }, - success(...args: unknown[]) { - console.log(chalk.green(...args)); - }, -}; diff --git a/bun.lock b/bun.lock index 598940f..0ab9221 100644 --- a/bun.lock +++ b/bun.lock @@ -14,7 +14,7 @@ }, "apps/cli": { "name": "create-better-t-stack", - "version": "0.3.4", + "version": "0.4.0", "bin": { "create-better-t-stack": "dist/index.js" },