mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
remove logger and fix minor bugs
This commit is contained in:
5
.changeset/wild-tools-flash.md
Normal file
5
.changeset/wild-tools-flash.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"create-better-t-stack": patch
|
||||
---
|
||||
|
||||
remove logger and fix minor bugs
|
||||
@@ -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";
|
||||
},
|
||||
|
||||
@@ -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));
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user