mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
replace chalk with picocolors
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import chalk from "chalk";
|
||||
import { DEFAULT_CONFIG } from "../consts";
|
||||
import type { ProjectConfig } from "../types";
|
||||
|
||||
@@ -12,37 +11,34 @@ export function generateReproducibleCommand(config: ProjectConfig): string {
|
||||
});
|
||||
|
||||
if (isMainlyDefault) {
|
||||
flags.push(chalk.gray("-y"));
|
||||
flags.push("-y");
|
||||
}
|
||||
|
||||
if (config.database !== DEFAULT_CONFIG.database) {
|
||||
flags.push(chalk.cyan(`--database ${config.database}`));
|
||||
flags.push(`--database ${config.database}`);
|
||||
}
|
||||
|
||||
if (config.auth !== DEFAULT_CONFIG.auth) {
|
||||
flags.push(chalk.yellow("--no-auth"));
|
||||
flags.push("--no-auth");
|
||||
}
|
||||
|
||||
if (!config.git) {
|
||||
flags.push(chalk.red("--no-git"));
|
||||
flags.push("--no-git");
|
||||
}
|
||||
|
||||
// Updated package manager flag handling
|
||||
if (
|
||||
config.packageManager &&
|
||||
config.packageManager !== DEFAULT_CONFIG.packageManager
|
||||
) {
|
||||
flags.push(chalk.magenta(`--${config.packageManager}`));
|
||||
flags.push(`--${config.packageManager}`);
|
||||
}
|
||||
|
||||
for (const feature of config.features) {
|
||||
flags.push(chalk.green(`--${feature}`));
|
||||
flags.push(`--${feature}`);
|
||||
}
|
||||
|
||||
const baseCommand = chalk.bold("npx create-better-t-stack");
|
||||
const projectName = config.projectName
|
||||
? chalk.blue(` ${config.projectName}`)
|
||||
: "";
|
||||
const baseCommand = "npx create-better-t-stack";
|
||||
const projectName = config.projectName ? ` ${config.projectName}` : "";
|
||||
const flagString = flags.length > 0 ? ` ${flags.join(" ")}` : "";
|
||||
|
||||
return `${baseCommand}${projectName}${flagString}`;
|
||||
|
||||
Reference in New Issue
Block a user