Skip to content

Commit 216c242

Browse files
feat(cli): add ultracite, oxlint, fumadocs addons (#427)
1 parent 82a4f42 commit 216c242

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+797
-254
lines changed

.changeset/sad-months-drop.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
"create-better-t-stack": minor
3+
---
4+
5+
Added addons: fumadocs, ultracite, oxlint
6+
7+
Added bunfig.toml with isolated linker
8+
9+
Grouped addon prompts

apps/cli/src/constants.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import path from "node:path";
22
import { fileURLToPath } from "node:url";
3-
import type { Frontend, ProjectConfig } from "./types";
3+
import type { Addons, Frontend, ProjectConfig } from "./types";
44
import { getUserPkgManager } from "./utils/get-package-manager";
55

66
const __filename = fileURLToPath(import.meta.url);
@@ -55,10 +55,12 @@ export const dependencyVersionMap = {
5555

5656
"@tauri-apps/cli": "^2.4.0",
5757

58-
"@biomejs/biome": "^2.0.0",
58+
"@biomejs/biome": "^2.1.2",
59+
oxlint: "^1.8.0",
60+
ultracite: "5.1.1",
5961

6062
husky: "^9.1.7",
61-
"lint-staged": "^15.5.0",
63+
"lint-staged": "^16.1.2",
6264

6365
tsx: "^4.19.2",
6466
"@types/node": "^22.13.11",
@@ -119,13 +121,16 @@ export const dependencyVersionMap = {
119121

120122
export type AvailableDependencies = keyof typeof dependencyVersionMap;
121123

122-
export const ADDON_COMPATIBILITY = {
124+
export const ADDON_COMPATIBILITY: Record<Addons, readonly Frontend[]> = {
123125
pwa: ["tanstack-router", "react-router", "solid", "next"],
124126
tauri: ["tanstack-router", "react-router", "nuxt", "svelte", "solid"],
125127
biome: [],
126128
husky: [],
127129
turborepo: [],
128130
starlight: [],
131+
ultracite: [],
132+
oxlint: [],
133+
fumadocs: [],
129134
none: [],
130135
} as const;
131136

apps/cli/src/helpers/database-providers/d1-setup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
type EnvVariable,
66
} from "../project-generation/env-setup";
77

8-
export async function setupCloudflareD1(config: ProjectConfig): Promise<void> {
8+
export async function setupCloudflareD1(config: ProjectConfig) {
99
const { projectDir } = config;
1010

1111
const envPath = path.join(projectDir, "apps/server", ".env");

apps/cli/src/helpers/database-providers/docker-compose-setup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
type EnvVariable,
66
} from "../project-generation/env-setup";
77

8-
export async function setupDockerCompose(config: ProjectConfig): Promise<void> {
8+
export async function setupDockerCompose(config: ProjectConfig) {
99
const { database, projectDir, projectName } = config;
1010

1111
if (database === "none" || database === "sqlite") {

apps/cli/src/helpers/database-providers/neon-setup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ function displayManualSetupInstructions() {
156156
DATABASE_URL="your_connection_string"`);
157157
}
158158

159-
export async function setupNeonPostgres(config: ProjectConfig): Promise<void> {
159+
export async function setupNeonPostgres(config: ProjectConfig) {
160160
const { packageManager, projectDir } = config;
161161

162162
try {

apps/cli/src/helpers/database-providers/turso-setup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ DATABASE_URL=your_database_url
206206
DATABASE_AUTH_TOKEN=your_auth_token`);
207207
}
208208

209-
export async function setupTurso(config: ProjectConfig): Promise<void> {
209+
export async function setupTurso(config: ProjectConfig) {
210210
const { orm, projectDir } = config;
211211
const _isDrizzle = orm === "drizzle";
212212
const setupSpinner = spinner();

apps/cli/src/helpers/project-generation/add-addons.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function exitWithError(message: string): never {
1919

2020
export async function addAddonsToProject(
2121
input: AddInput & { addons: Addons[]; suppressInstallMessage?: boolean },
22-
): Promise<void> {
22+
) {
2323
try {
2424
const projectDir = input.projectDir || process.cwd();
2525

apps/cli/src/helpers/project-generation/add-deployment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function exitWithError(message: string): never {
1818

1919
export async function addDeploymentToProject(
2020
input: AddInput & { webDeploy: WebDeploy; suppressInstallMessage?: boolean },
21-
): Promise<void> {
21+
) {
2222
try {
2323
const projectDir = input.projectDir || process.cwd();
2424

apps/cli/src/helpers/project-generation/command-handlers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export async function createProjectHandler(
136136
}
137137
}
138138

139-
export async function addAddonsHandler(input: AddInput): Promise<void> {
139+
export async function addAddonsHandler(input: AddInput) {
140140
try {
141141
const projectDir = input.projectDir || process.cwd();
142142
const detectedConfig = await detectProjectConfig(projectDir);

apps/cli/src/helpers/project-generation/env-setup.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export interface EnvVariable {
1212
export async function addEnvVariablesToFile(
1313
filePath: string,
1414
variables: EnvVariable[],
15-
): Promise<void> {
15+
) {
1616
await fs.ensureDir(path.dirname(filePath));
1717

1818
let envContent = "";
@@ -84,9 +84,7 @@ export async function addEnvVariablesToFile(
8484
}
8585
}
8686

87-
export async function setupEnvironmentVariables(
88-
config: ProjectConfig,
89-
): Promise<void> {
87+
export async function setupEnvironmentVariables(config: ProjectConfig) {
9088
const { backend, frontend, database, auth, examples, dbSetup, projectDir } =
9189
config;
9290

0 commit comments

Comments
 (0)