Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
176 changes: 88 additions & 88 deletions apps/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,90 +1,90 @@
{
"name": "create-better-t-stack",
"version": "2.44.0",
"description": "A modern CLI tool for scaffolding end-to-end type-safe TypeScript projects with best practices and customizable configurations",
"type": "module",
"license": "MIT",
"author": "Aman Varshney",
"bin": {
"create-better-t-stack": "dist/cli.js"
},
"files": [
"templates",
"dist"
],
"keywords": [
"better-t-stack",
"typescript",
"boilerplate",
"starter",
"cli",
"turborepo",
"trpc",
"better-auth",
"monorepo",
"fullstack",
"type-safety",
"react",
"react-native",
"expo",
"hono",
"elysia",
"drizzle",
"prisma",
"tanstack",
"tailwind",
"shadcn",
"pwa",
"tauri",
"biome"
],
"repository": {
"type": "git",
"url": "git+https://github.com/AmanVarshney01/create-better-t-stack.git",
"directory": "apps/cli"
},
"publishConfig": {
"access": "public"
},
"homepage": "https://better-t-stack.dev/",
"scripts": {
"build": "tsdown",
"dev": "tsdown --watch",
"check-types": "tsc --noEmit",
"check": "biome check --write .",
"test": "bun run build && vitest run",
"test:ui": "bun run build && vitest --ui",
"test:with-build": "bun run build && WITH_BUILD=1 vitest --ui",
"prepublishOnly": "npm run build"
},
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
}
},
"dependencies": {
"@biomejs/js-api": "^3.0.0",
"@biomejs/wasm-nodejs": "^2.2.4",
"@clack/prompts": "^1.0.0-alpha.4",
"consola": "^3.4.2",
"execa": "^9.6.0",
"fs-extra": "^11.3.1",
"gradient-string": "^3.0.0",
"handlebars": "^4.7.8",
"jsonc-parser": "^3.3.1",
"picocolors": "^1.1.1",
"tinyglobby": "^0.2.15",
"trpc-cli": "^0.10.2",
"ts-morph": "^27.0.0",
"zod": "^4.1.5"
},
"devDependencies": {
"@types/fs-extra": "^11.0.4",
"@types/node": "^24.3.1",
"@vitest/ui": "^3.2.4",
"tsdown": "^0.14.2",
"typescript": "^5.9.2",
"vitest": "^3.2.4"
}
"name": "create-better-t-stack",
"version": "2.44.0",
"description": "A modern CLI tool for scaffolding end-to-end type-safe TypeScript projects with best practices and customizable configurations",
"type": "module",
"license": "MIT",
"author": "Aman Varshney",
"bin": {
"create-better-t-stack": "dist/cli.js"
},
"files": [
"templates",
"dist"
],
"keywords": [
"better-t-stack",
"typescript",
"boilerplate",
"starter",
"cli",
"turborepo",
"trpc",
"better-auth",
"monorepo",
"fullstack",
"type-safety",
"react",
"react-native",
"expo",
"hono",
"elysia",
"drizzle",
"prisma",
"tanstack",
"tailwind",
"shadcn",
"pwa",
"tauri",
"biome"
],
"repository": {
"type": "git",
"url": "git+https://github.com/AmanVarshney01/create-better-t-stack.git",
"directory": "apps/cli"
},
"publishConfig": {
"access": "public"
},
"homepage": "https://better-t-stack.dev/",
"scripts": {
"build": "tsdown",
"dev": "tsdown --watch",
"check-types": "tsc --noEmit",
"check": "biome check --write .",
"test": "bun run build && vitest run",
"test:ui": "bun run build && vitest --ui",
"test:with-build": "bun run build && WITH_BUILD=1 vitest --ui",
"prepublishOnly": "npm run build"
},
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
}
},
"dependencies": {
"@biomejs/js-api": "^3.0.0",
"@biomejs/wasm-nodejs": "^2.2.4",
"@clack/prompts": "^1.0.0-alpha.4",
"consola": "^3.4.2",
"execa": "^9.6.0",
"fs-extra": "^11.3.1",
"gradient-string": "^3.0.0",
"handlebars": "^4.7.8",
"jsonc-parser": "^3.3.1",
"picocolors": "^1.1.1",
"tinyglobby": "^0.2.15",
"trpc-cli": "^0.10.2",
"ts-morph": "^27.0.0",
"zod": "^4.1.5"
},
"devDependencies": {
"@types/fs-extra": "^11.0.4",
"@types/node": "^24.3.1",
"@vitest/ui": "^3.2.4",
"tsdown": "^0.14.2",
"typescript": "^5.9.2",
"vitest": "^3.2.4"
}
}
2 changes: 1 addition & 1 deletion apps/cli/src/helpers/core/template-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,7 @@ export async function handleExtras(projectDir: string, context: ProjectConfig) {
const pnpmWorkspaceSrc = path.join(extrasDir, "pnpm-workspace.yaml");
const pnpmWorkspaceDest = path.join(projectDir, "pnpm-workspace.yaml");
if (await fs.pathExists(pnpmWorkspaceSrc)) {
await fs.copy(pnpmWorkspaceSrc, pnpmWorkspaceDest);
await processTemplate(pnpmWorkspaceSrc, pnpmWorkspaceDest, context);
}
}

Expand Down
14 changes: 14 additions & 0 deletions apps/cli/src/utils/template-processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ import handlebars from "handlebars";
import type { ProjectConfig } from "../types";
import { formatFileWithBiome } from "./biome-formatter";

const BINARY_EXTENSIONS = new Set([
".png", ".ico", ".svg",
]);

function isBinaryFile(filePath: string): boolean {
const ext = path.extname(filePath).toLowerCase();
return BINARY_EXTENSIONS.has(ext);
}

export async function processTemplate(
srcPath: string,
destPath: string,
Expand All @@ -13,6 +22,11 @@ export async function processTemplate(
try {
await fs.ensureDir(path.dirname(destPath));

if (isBinaryFile(srcPath) && !srcPath.endsWith(".hbs")) {
await fs.copy(srcPath, destPath);
return;
}

let content: string;

if (srcPath.endsWith(".hbs")) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createAuthClient } from "better-auth/react";
import { expoClient } from "@better-auth/expo/client";
import { createAuthClient } from "better-auth/react";
import * as SecureStore from "expo-secure-store";

export const authClient = createAuthClient({
Expand Down
6 changes: 3 additions & 3 deletions apps/cli/templates/backend/server/next/package.json.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
},
"dependencies": {
"next": "15.5.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react": "19.1.0",
"react-dom": "19.1.0",
"dotenv": "^17.2.1"
},
{{#if (eq dbSetup 'supabase')}}
Expand All @@ -20,7 +20,7 @@
{{/if}}
"devDependencies": {
"@types/node": "^20",
"@types/react": "^19",
"@types/react": "~19.1.10",
"zod": "^4.0.13",
"typescript": "^5"
}
Expand Down
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
2 changes: 0 additions & 2 deletions apps/cli/templates/frontend/native/nativewind/app-env.d.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default function TabLayout() {

return (
<Tabs
screenOptions={{
screenOptions=\{{
headerShown: false,
tabBarActiveTintColor: isDarkColorScheme
? "hsl(217.2 91.2% 59.8%)"
Expand All @@ -27,14 +27,14 @@ export default function TabLayout() {
>
<Tabs.Screen
name="index"
options={{
options=\{{
title: "Home",
tabBarIcon: ({ color }) => <TabBarIcon name="home" color={color} />,
}}
/>
<Tabs.Screen
name="two"
options={{
options=\{{
title: "Explore",
tabBarIcon: ({ color }) => (
<TabBarIcon name="compass" color={color} />
Expand Down
47 changes: 0 additions & 47 deletions apps/cli/templates/frontend/native/nativewind/app/+html.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Text, View } from "react-native";
export default function NotFoundScreen() {
return (
<>
<Stack.Screen options={{ title: "Oops!" }} />
<Stack.Screen options=\{{ title: "Oops!" }} />
<Container>
<View className="flex-1 justify-center items-center p-6">
<View className="items-center">
Expand Down
11 changes: 0 additions & 11 deletions apps/cli/templates/frontend/native/nativewind/babel.config.js

This file was deleted.

14 changes: 14 additions & 0 deletions apps/cli/templates/frontend/native/nativewind/babel.config.js.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = (api) => {
api.cache(true);
const plugins = [];

plugins.push("react-native-worklets/plugin");

return {
presets: [
["babel-preset-expo", { jsxImportSource: "nativewind" }],
"nativewind/babel",
],
plugins,
};
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import { SafeAreaView } from "react-native";
import { SafeAreaView } from "react-native-safe-area-context";

export const Container = ({ children }: { children: React.ReactNode }) => {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const HeaderButton = forwardRef<
name="info-circle"
size={20}
className="text-secondary-foreground"
style={{
style=\{{
opacity: pressed ? 0.7 : 1,
}}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ export const TabBarIcon = (props: {
name: React.ComponentProps<typeof FontAwesome>["name"];
color: string;
}) => {
return <FontAwesome size={24} style={{ marginBottom: -3 }} {...props} />;
return <FontAwesome size={24} style=\{{ marginBottom: -3 }} {...props} />;
};
Loading