mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
feat(cli): add ultracite, oxlint, fumadocs addons (#427)
This commit is contained in:
@@ -1,4 +1,17 @@
|
||||
export const TECH_OPTIONS = {
|
||||
import type { TechCategory } from "./types";
|
||||
|
||||
export const TECH_OPTIONS: Record<
|
||||
TechCategory,
|
||||
{
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
icon: string;
|
||||
color: string;
|
||||
default?: boolean;
|
||||
className?: string;
|
||||
}[]
|
||||
> = {
|
||||
api: [
|
||||
{
|
||||
id: "trpc",
|
||||
@@ -97,6 +110,7 @@ export const TECH_OPTIONS = {
|
||||
description: "Expo with NativeWind (Tailwind)",
|
||||
icon: "/icon/expo.svg",
|
||||
color: "from-purple-400 to-purple-600",
|
||||
className: "invert-0 dark:invert",
|
||||
default: false,
|
||||
},
|
||||
{
|
||||
@@ -105,6 +119,7 @@ export const TECH_OPTIONS = {
|
||||
description: "Expo with Unistyles",
|
||||
icon: "/icon/expo.svg",
|
||||
color: "from-pink-400 to-pink-600",
|
||||
className: "invert-0 dark:invert",
|
||||
default: false,
|
||||
},
|
||||
{
|
||||
@@ -368,6 +383,7 @@ export const TECH_OPTIONS = {
|
||||
description: "Default package manager",
|
||||
icon: "/icon/npm.svg",
|
||||
color: "from-red-500 to-red-700",
|
||||
className: "invert-0 dark:invert",
|
||||
},
|
||||
{
|
||||
id: "pnpm",
|
||||
@@ -388,8 +404,8 @@ export const TECH_OPTIONS = {
|
||||
addons: [
|
||||
{
|
||||
id: "pwa",
|
||||
name: "PWA",
|
||||
description: "Progressive Web App",
|
||||
name: "PWA (Progressive Web App)",
|
||||
description: "Make your app installable and work offline",
|
||||
icon: "",
|
||||
color: "from-blue-500 to-blue-700",
|
||||
default: false,
|
||||
@@ -397,7 +413,7 @@ export const TECH_OPTIONS = {
|
||||
{
|
||||
id: "tauri",
|
||||
name: "Tauri",
|
||||
description: "Desktop app support",
|
||||
description: "Build native desktop apps",
|
||||
icon: "/icon/tauri.svg",
|
||||
color: "from-amber-500 to-amber-700",
|
||||
default: false,
|
||||
@@ -405,7 +421,7 @@ export const TECH_OPTIONS = {
|
||||
{
|
||||
id: "starlight",
|
||||
name: "Starlight",
|
||||
description: "Documentation site with Astro",
|
||||
description: "Build stellar docs with astro",
|
||||
icon: "/icon/starlight.svg",
|
||||
color: "from-teal-500 to-teal-700",
|
||||
default: false,
|
||||
@@ -413,7 +429,7 @@ export const TECH_OPTIONS = {
|
||||
{
|
||||
id: "biome",
|
||||
name: "Biome",
|
||||
description: "Linting & formatting",
|
||||
description: "Format, lint, and more",
|
||||
icon: "/icon/biome.svg",
|
||||
color: "from-green-500 to-green-700",
|
||||
default: false,
|
||||
@@ -421,15 +437,40 @@ export const TECH_OPTIONS = {
|
||||
{
|
||||
id: "husky",
|
||||
name: "Husky",
|
||||
description: "Git hooks & lint-staged",
|
||||
description: "Modern native Git hooks made easy",
|
||||
icon: "",
|
||||
color: "from-purple-500 to-purple-700",
|
||||
default: false,
|
||||
},
|
||||
{
|
||||
id: "ultracite",
|
||||
name: "Ultracite",
|
||||
description: "Biome preset with AI integration",
|
||||
icon: "/icon/ultracite.svg",
|
||||
color: "from-blue-500 to-blue-700",
|
||||
className: "invert-0 dark:invert",
|
||||
default: false,
|
||||
},
|
||||
{
|
||||
id: "fumadocs",
|
||||
name: "Fumadocs",
|
||||
description: "Build excellent documentation site",
|
||||
icon: "",
|
||||
color: "from-indigo-500 to-indigo-700",
|
||||
default: false,
|
||||
},
|
||||
{
|
||||
id: "oxlint",
|
||||
name: "Oxlint",
|
||||
description: "Rust-powered linter",
|
||||
icon: "",
|
||||
color: "from-orange-500 to-orange-700",
|
||||
default: false,
|
||||
},
|
||||
{
|
||||
id: "turborepo",
|
||||
name: "Turborepo",
|
||||
description: "Monorepo build system",
|
||||
description: "High-performance build system",
|
||||
icon: "/icon/turborepo.svg",
|
||||
color: "from-gray-400 to-gray-700",
|
||||
default: true,
|
||||
|
||||
26
apps/web/src/lib/get-llm-text.ts
Normal file
26
apps/web/src/lib/get-llm-text.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import type { InferPageType } from "fumadocs-core/source";
|
||||
import { remarkInclude } from "fumadocs-mdx/config";
|
||||
import { remark } from "remark";
|
||||
import remarkGfm from "remark-gfm";
|
||||
import remarkMdx from "remark-mdx";
|
||||
import type { source } from "@/lib/source";
|
||||
|
||||
const processor = remark()
|
||||
.use(remarkMdx)
|
||||
// needed for Fumadocs MDX
|
||||
.use(remarkInclude)
|
||||
.use(remarkGfm);
|
||||
|
||||
export async function getLLMText(page: InferPageType<typeof source>) {
|
||||
const processed = await processor.process({
|
||||
path: page.data._file.absolutePath,
|
||||
value: page.data.content,
|
||||
});
|
||||
|
||||
return `# ${page.data.title}
|
||||
URL: ${page.url}
|
||||
|
||||
${page.data.description}
|
||||
|
||||
${processed.value}`;
|
||||
}
|
||||
@@ -1,27 +1,19 @@
|
||||
export type TechCategory =
|
||||
| "core"
|
||||
| "frontend"
|
||||
| "api"
|
||||
| "webFrontend"
|
||||
| "nativeFrontend"
|
||||
| "runtime"
|
||||
| "backend"
|
||||
| "database"
|
||||
| "auth"
|
||||
| "orm"
|
||||
| "router";
|
||||
|
||||
export interface TechNode {
|
||||
id: string;
|
||||
type: string;
|
||||
position: { x: number; y: number };
|
||||
data: {
|
||||
label: string;
|
||||
category: TechCategory;
|
||||
description: string;
|
||||
isDefault: boolean;
|
||||
alternatives?: string[];
|
||||
isActive: boolean;
|
||||
group?: TechCategory;
|
||||
isStatic?: boolean;
|
||||
};
|
||||
}
|
||||
| "dbSetup"
|
||||
| "webDeploy"
|
||||
| "auth"
|
||||
| "packageManager"
|
||||
| "addons"
|
||||
| "examples"
|
||||
| "git"
|
||||
| "install";
|
||||
|
||||
export interface TechEdge {
|
||||
id: string;
|
||||
|
||||
Reference in New Issue
Block a user