Skip to content

Commit d30adfd

Browse files
remove ugly emojis
1 parent 6454dc7 commit d30adfd

File tree

6 files changed

+45
-53
lines changed

6 files changed

+45
-53
lines changed

.changeset/metal-actors-talk.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"create-better-t-stack": patch
3+
---
4+
5+
remove ugly emojis

apps/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"url": "git+https://github.com/better-t-stack/create-better-t-stack.git",
1414
"directory": "apps/cli"
1515
},
16-
"homepage": "https://github.com/better-t-stack/create-better-t-stack/tree/main/apps/cli#readme",
16+
"homepage": "https://better-t-stack.pages.dev/",
1717
"scripts": {
1818
"build": "tsup",
1919
"dev": "tsup --watch",

apps/cli/src/helpers/create-project.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ export async function createProject(options: ProjectConfig) {
1515
try {
1616
const tasksList = [
1717
{
18-
title: "📁 Creating project directory",
18+
title: "Creating project directory",
1919
task: async () => {
2020
await fs.ensureDir(projectDir);
2121
},
2222
},
2323
{
24-
title: "📥 Cloning template repository",
24+
title: "Cloning template repository",
2525
task: async () => {
2626
try {
2727
const emitter = degit("better-t-stack/Better-T-Stack#bare");
@@ -39,7 +39,7 @@ export async function createProject(options: ProjectConfig) {
3939

4040
if (options.git) {
4141
tasksList.push({
42-
title: "🗃️ Initializing git repository",
42+
title: "Initializing git repository",
4343
task: async () => {
4444
await $({
4545
cwd: projectDir,
@@ -55,7 +55,7 @@ export async function createProject(options: ProjectConfig) {
5555
}
5656

5757
const installDepsResponse = await confirm({
58-
message: `📦 Install dependencies with ${pc.magenta(options.packageManager)}?`,
58+
message: `Install dependencies with ${options.packageManager}?`,
5959
});
6060

6161
if (isCancel(installDepsResponse)) {
@@ -66,14 +66,12 @@ export async function createProject(options: ProjectConfig) {
6666
shouldInstallDeps = installDepsResponse;
6767

6868
if (shouldInstallDeps) {
69-
s.start(
70-
`📦 Installing dependencies using ${pc.magenta(options.packageManager)}...`,
71-
);
69+
s.start(`Installing dependencies using ${options.packageManager}...`);
7270
try {
7371
await $({
7472
cwd: projectDir,
7573
})`${options.packageManager} install`;
76-
s.stop("Dependencies installed successfully");
74+
s.stop("Dependencies installed successfully");
7775
} catch (error) {
7876
s.stop(pc.red("Failed to install dependencies"));
7977
if (error instanceof Error) {

apps/cli/src/helpers/db-setup.ts

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
import os from "node:os";
22
import path from "node:path";
3-
import {
4-
cancel,
5-
confirm,
6-
isCancel,
7-
log,
8-
outro,
9-
spinner,
10-
text,
11-
} from "@clack/prompts";
3+
import { cancel, confirm, isCancel, log, spinner, text } from "@clack/prompts";
124
import { $ } from "execa";
135
import fs from "fs-extra";
146
import pc from "picocolors";
@@ -22,9 +14,9 @@ interface TursoConfig {
2214
async function loginToTurso() {
2315
const s = spinner();
2416
try {
25-
s.start("🔄 Logging in to Turso...");
17+
s.start("Logging in to Turso...");
2618
await $`turso auth login`;
27-
s.stop("Logged in to Turso successfully!");
19+
s.stop("Logged in to Turso successfully!");
2820
} catch (error) {
2921
s.stop(pc.red("Failed to log in to Turso"));
3022
throw error;
@@ -34,7 +26,7 @@ async function loginToTurso() {
3426
async function installTursoCLI(isMac: boolean) {
3527
const s = spinner();
3628
try {
37-
s.start("🔄 Installing Turso CLI...");
29+
s.start("Installing Turso CLI...");
3830

3931
if (isMac) {
4032
await $`brew install tursodatabase/tap/turso`;
@@ -44,7 +36,7 @@ async function installTursoCLI(isMac: boolean) {
4436
await $`bash -c '${installScript}'`;
4537
}
4638

47-
s.stop("Turso CLI installed successfully!");
39+
s.stop("Turso CLI installed successfully!");
4840
} catch (error) {
4941
if (error instanceof Error && error.message.includes("User force closed")) {
5042
s.stop();
@@ -87,7 +79,7 @@ TURSO_AUTH_TOKEN=`;
8779
}
8880

8981
function displayManualSetupInstructions() {
90-
log.info(`🔧 Manual Turso Setup Instructions:
82+
log.info(`Manual Turso Setup Instructions:
9183
9284
1. Visit https://turso.tech and create an account
9385
2. Create a new database from the dashboard
@@ -115,7 +107,7 @@ export async function setupTurso(projectDir: string) {
115107

116108
if (!isCliInstalled) {
117109
const shouldInstall = await confirm({
118-
message: "🔧 Would you like to install Turso CLI?",
110+
message: "Would you like to install Turso CLI?",
119111
});
120112

121113
if (isCancel(shouldInstall)) {
@@ -130,7 +122,7 @@ export async function setupTurso(projectDir: string) {
130122
}
131123

132124
const s = spinner();
133-
s.start("🔄 Installing Turso CLI...");
125+
s.start("Installing Turso CLI...");
134126
try {
135127
if (isMac) {
136128
await $`brew install tursodatabase/tap/turso`;
@@ -139,7 +131,7 @@ export async function setupTurso(projectDir: string) {
139131
await $`curl -sSfL https://get.tur.so/install.sh`;
140132
await $`bash -c '${installScript}'`;
141133
}
142-
s.stop("Turso CLI installed successfully!");
134+
s.stop("Turso CLI installed successfully!");
143135
} catch (error) {
144136
s.stop(pc.red("Failed to install Turso CLI"));
145137
throw error;
@@ -149,10 +141,10 @@ export async function setupTurso(projectDir: string) {
149141
const isLoggedIn = await isTursoLoggedIn();
150142
if (!isLoggedIn) {
151143
const s = spinner();
152-
s.start("🔄 Logging in to Turso...");
144+
s.start("Logging in to Turso...");
153145
try {
154146
await $`turso auth login`;
155-
s.stop("Logged in to Turso successfully!");
147+
s.stop("Logged in to Turso successfully!");
156148
} catch (error) {
157149
s.stop(pc.red("Failed to log in to Turso"));
158150
throw error;
@@ -165,7 +157,7 @@ export async function setupTurso(projectDir: string) {
165157

166158
while (!success) {
167159
const dbNameResponse = await text({
168-
message: "📝 Enter a name for your database:",
160+
message: "Enter a name for your database:",
169161
defaultValue: suggestedName,
170162
initialValue: suggestedName,
171163
placeholder: suggestedName,
@@ -180,10 +172,10 @@ export async function setupTurso(projectDir: string) {
180172
const s = spinner();
181173

182174
try {
183-
s.start(`🔄 Creating Turso database "${dbName}"...`);
175+
s.start(`Creating Turso database "${dbName}"...`);
184176
const config = await createTursoDatabase(dbName);
185177
await writeEnvFile(projectDir, config);
186-
s.stop("Turso database configured successfully!");
178+
s.stop("Turso database configured successfully!");
187179
success = true;
188180
} catch (error) {
189181
if (error instanceof Error && error.message === "DATABASE_EXISTS") {

apps/cli/src/index.ts

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ async function gatherConfig(
5353

5454
while (!isValid) {
5555
const response = await text({
56-
message: "📝 What is your project named? (directory name or path)",
56+
message: "What is your project named? (directory name or path)",
5757
placeholder: defaultName,
5858
initialValue: flags.projectName,
5959
defaultValue: defaultName,
@@ -87,7 +87,7 @@ async function gatherConfig(
8787
flags.database !== undefined
8888
? Promise.resolve(flags.database)
8989
: select<ProjectDatabase>({
90-
message: "💾 Which database would you like to use?",
90+
message: "Which database would you like to use?",
9191
options: [
9292
{
9393
value: "libsql",
@@ -105,15 +105,14 @@ async function gatherConfig(
105105
flags.auth !== undefined
106106
? Promise.resolve(flags.auth)
107107
: confirm({
108-
message:
109-
"🔐 Would you like to add authentication with Better-Auth?",
108+
message: "Would you like to add authentication with Better-Auth?",
110109
initialValue: DEFAULT_CONFIG.auth,
111110
}),
112111
features: () =>
113112
flags.features !== undefined
114113
? Promise.resolve(flags.features)
115114
: multiselect<ProjectFeature>({
116-
message: "Which features would you like to add?",
115+
message: "Which features would you like to add?",
117116
options: [
118117
{
119118
value: "docker",
@@ -137,7 +136,7 @@ async function gatherConfig(
137136
flags.git !== undefined
138137
? Promise.resolve(flags.git)
139138
: confirm({
140-
message: "🗃️ Initialize a new git repository?",
139+
message: "Initialize a new git repository?",
141140
initialValue: DEFAULT_CONFIG.git,
142141
}),
143142
packageManager: async () => {
@@ -147,13 +146,13 @@ async function gatherConfig(
147146
const detectedPackageManager = getUserPkgManager();
148147

149148
const useDetected = await confirm({
150-
message: `📦 Use ${detectedPackageManager} as your package manager?`,
149+
message: `Use ${detectedPackageManager} as your package manager?`,
151150
});
152151

153152
if (useDetected) return detectedPackageManager;
154153

155154
return select<PackageManager>({
156-
message: "📦 Which package manager would you like to use?",
155+
message: "Which package manager would you like to use?",
157156
options: [
158157
{ value: "npm", label: "npm", hint: "Node Package Manager" },
159158
{
@@ -198,25 +197,23 @@ function displayConfig(config: Partial<ProjectConfig>) {
198197
const configDisplay = [];
199198

200199
if (config.projectName) {
201-
configDisplay.push(`${pc.blue("📝 Project Name:")} ${config.projectName}`);
200+
configDisplay.push(`${pc.blue("Project Name:")} ${config.projectName}`);
202201
}
203202
if (config.database) {
204-
configDisplay.push(`${pc.blue("💾 Database:")} ${config.database}`);
203+
configDisplay.push(`${pc.blue("Database:")} ${config.database}`);
205204
}
206205
if (config.auth !== undefined) {
207-
configDisplay.push(`${pc.blue("🔐 Authentication:")} ${config.auth}`);
206+
configDisplay.push(`${pc.blue("Authentication:")} ${config.auth}`);
208207
}
209208
if (config.features?.length) {
210-
configDisplay.push(
211-
`${pc.blue("✨ Features:")} ${config.features.join(", ")}`,
212-
);
209+
configDisplay.push(`${pc.blue("Features:")} ${config.features.join(", ")}`);
213210
}
214211
if (config.git !== undefined) {
215-
configDisplay.push(`${pc.blue("🗃️ Git Init:")} ${config.git}`);
212+
configDisplay.push(`${pc.blue("Git Init:")} ${config.git}`);
216213
}
217214
if (config.packageManager) {
218215
configDisplay.push(
219-
`${pc.blue("📦 Package Manager:")} ${config.packageManager}`,
216+
`${pc.blue("Package Manager:")} ${config.packageManager}`,
220217
);
221218
}
222219

@@ -228,7 +225,7 @@ async function main() {
228225
try {
229226
process.stdout.write("\x1Bc");
230227
renderTitle();
231-
intro(pc.magenta("Creating a new Better-T-Stack project"));
228+
intro(pc.magenta("Creating a new Better-T-Stack project"));
232229
program
233230
.name("create-better-t-stack")
234231
.description("Create a new Better-T Stack project")
@@ -280,7 +277,7 @@ async function main() {
280277
!options.yes &&
281278
Object.values(flagConfig).some((v) => v !== undefined)
282279
) {
283-
log.info(pc.yellow("🎯 Using these pre-selected options:"));
280+
log.info(pc.yellow("Using these pre-selected options:"));
284281
log.message(displayConfig(flagConfig));
285282
log.message("");
286283
}
@@ -304,7 +301,7 @@ async function main() {
304301
: await gatherConfig(flagConfig);
305302

306303
if (options.yes) {
307-
log.info(pc.yellow("🎯 Using these default options:"));
304+
log.info(pc.yellow("Using these default options:"));
308305
log.message(displayConfig(config));
309306
log.message("");
310307
}
@@ -319,7 +316,7 @@ async function main() {
319316
),
320317
);
321318

322-
outro(pc.magenta("🎉 Project created successfully!"));
319+
outro(pc.magenta("Project created successfully!"));
323320
} catch (error) {
324321
s.stop(pc.red("Failed"));
325322
if (error instanceof Error) {

apps/cli/src/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ export type ProjectFeature = "docker" | "github-actions" | "SEO";
22

33
export type ProjectDatabase = "libsql" | "postgres";
44

5+
export type PackageManager = "npm" | "yarn" | "pnpm" | "bun";
6+
57
export type ProjectConfig = {
68
yes?: boolean;
79
projectName: string;
@@ -11,5 +13,3 @@ export type ProjectConfig = {
1113
packageManager: PackageManager;
1214
features: ProjectFeature[];
1315
};
14-
15-
export type PackageManager = "npm" | "yarn" | "pnpm" | "bun";

0 commit comments

Comments
 (0)