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,
|
confirm,
|
||||||
group,
|
group,
|
||||||
intro,
|
intro,
|
||||||
isCancel,
|
|
||||||
multiselect,
|
multiselect,
|
||||||
outro,
|
outro,
|
||||||
select,
|
select,
|
||||||
@@ -24,11 +23,10 @@ import type {
|
|||||||
import { generateReproducibleCommand } from "./utils/generate-reproducible-command";
|
import { generateReproducibleCommand } from "./utils/generate-reproducible-command";
|
||||||
import { getUserPkgManager } from "./utils/get-package-manager";
|
import { getUserPkgManager } from "./utils/get-package-manager";
|
||||||
import { getVersion } from "./utils/get-version";
|
import { getVersion } from "./utils/get-version";
|
||||||
import { logger } from "./utils/logger";
|
|
||||||
|
|
||||||
process.on("SIGINT", () => {
|
process.on("SIGINT", () => {
|
||||||
console.log("\n");
|
console.log("\n");
|
||||||
logger.warn("Operation cancelled");
|
chalk.red("Operation cancelled");
|
||||||
process.exit(0);
|
process.exit(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -42,6 +40,7 @@ async function gatherConfig(
|
|||||||
text({
|
text({
|
||||||
message: "📝 Project name",
|
message: "📝 Project name",
|
||||||
placeholder: "my-better-t-app",
|
placeholder: "my-better-t-app",
|
||||||
|
defaultValue: flags.projectName || "my-better-t-app",
|
||||||
validate: (value) => {
|
validate: (value) => {
|
||||||
if (!value) return "Project name is required";
|
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