-
-
Notifications
You must be signed in to change notification settings - Fork 296
Expand file tree
/
Copy pathconstants.ts
More file actions
71 lines (62 loc) · 1.7 KB
/
constants.ts
File metadata and controls
71 lines (62 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import path from "node:path";
import { fileURLToPath } from "node:url";
import { desktopWebFrontends } from "@better-t-stack/types";
import { getUserPkgManager } from "./utils/get-package-manager";
// Re-export from template-generator (single source of truth)
export {
dependencyVersionMap,
type AvailableDependencies,
} from "@better-t-stack/template-generator";
const __filename = fileURLToPath(import.meta.url);
const distPath = path.dirname(__filename);
export const PKG_ROOT = path.join(distPath, "../");
export const DEFAULT_CONFIG_BASE = {
projectName: "my-better-t-app",
relativePath: "my-better-t-app",
frontend: ["tanstack-router"],
database: "sqlite",
orm: "drizzle",
auth: "better-auth",
payments: "none",
addons: ["turborepo"],
examples: [],
git: true,
install: true,
dbSetup: "none",
backend: "hono",
runtime: "bun",
api: "trpc",
webDeploy: "none",
serverDeploy: "none",
} as const;
export function getDefaultConfig() {
return {
...DEFAULT_CONFIG_BASE,
projectDir: path.resolve(process.cwd(), DEFAULT_CONFIG_BASE.projectName),
packageManager: getUserPkgManager(),
frontend: [...DEFAULT_CONFIG_BASE.frontend],
addons: [...DEFAULT_CONFIG_BASE.addons],
examples: [...DEFAULT_CONFIG_BASE.examples],
};
}
export const DEFAULT_CONFIG = getDefaultConfig();
export { desktopWebFrontends };
export const ADDON_COMPATIBILITY = {
pwa: ["tanstack-router", "react-router", "solid", "next"],
tauri: desktopWebFrontends,
electrobun: desktopWebFrontends,
biome: [],
husky: [],
lefthook: [],
turborepo: [],
nx: [],
starlight: [],
ultracite: [],
mcp: [],
oxc: [],
fumadocs: [],
opentui: [],
wxt: [],
skills: [],
none: [],
} as const;