Skip to content

Commit e15a4f9

Browse files
feat: add turborepo
1 parent 1b2903a commit e15a4f9

27 files changed

Lines changed: 362 additions & 9 deletions

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"js/ts.tsdk.path": "node_modules\\typescript\\lib"
3+
}

apps/web/app/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { Button } from "@workspace/ui/components/button"
2+
import { add } from "@workspace/math/add"
23

34
export default function Page() {
45
return (
56
<div className="flex min-h-svh p-6">
67
<div className="flex max-w-md min-w-0 flex-col gap-4 text-sm leading-loose">
78
<div>
89
<h1 className="font-medium">Project ready!</h1>
9-
<p>You may now add components and start building.</p>
10-
<p>We&apos;ve already added the button component for you.</p>
10+
<p>{add(1, 2)}</p>
1111
<Button className="mt-2">Button</Button>
1212
</div>
1313
<div className="text-muted-foreground font-mono text-xs">

apps/web/next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3-
import "./.next/dev/types/routes.d.ts"
3+
import "./.next/dev/types/routes.d.ts";
44

55
// NOTE: This file should not be edited
66
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

apps/web/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44
"type": "module",
55
"private": true,
66
"scripts": {
7-
"dev": "next dev --turbopack",
7+
"dev": "next dev --turbopack --port 3000",
88
"build": "next build",
99
"start": "next start",
1010
"lint": "eslint",
1111
"format": "prettier --write \"**/*.{ts,tsx}\"",
1212
"typecheck": "tsc --noEmit"
1313
},
1414
"dependencies": {
15+
"@workspace/math": "workspace:*",
1516
"@workspace/ui": "workspace:*",
1617
"lucide-react": "^1.8.0",
1718
"next": "16.1.6",

apps/web/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"baseUrl": ".",
55
"paths": {
66
"@/*": ["./*"],
7-
"@workspace/ui/*": ["../../packages/ui/src/*"]
7+
"@workspace/ui/*": ["../../packages/ui/src/*"],
8+
"@workspace/math/*": ["../../packages/math/src/*"]
89
},
910
"plugins": [
1011
{

apps/widget/app/favicon.ico

25.3 KB
Binary file not shown.

apps/widget/app/layout.tsx

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { Geist, Geist_Mono } from "next/font/google"
2+
3+
import "@workspace/ui/styles/globals.css"
4+
import { ThemeProvider } from "@/components/theme-provider"
5+
import { cn } from "@workspace/ui/lib/utils";
6+
7+
const geist = Geist({subsets:['latin'],variable:'--font-sans'})
8+
9+
const fontMono = Geist_Mono({
10+
subsets: ["latin"],
11+
variable: "--font-mono",
12+
})
13+
14+
export default function RootLayout({
15+
children,
16+
}: Readonly<{
17+
children: React.ReactNode
18+
}>) {
19+
return (
20+
<html
21+
lang="en"
22+
suppressHydrationWarning
23+
className={cn("antialiased", fontMono.variable, "font-sans", geist.variable)}
24+
>
25+
<body>
26+
<ThemeProvider>{children}</ThemeProvider>
27+
</body>
28+
</html>
29+
)
30+
}

apps/widget/app/page.tsx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { Button } from "@workspace/ui/components/button"
2+
import {add } from "@workspace/math/add"
3+
import { Input } from "@workspace/ui/components/input"
4+
5+
export default function Page() {
6+
return (
7+
<div className="flex min-h-svh p-6">
8+
<div className="flex max-w-md min-w-0 flex-col gap-4 text-sm leading-loose">
9+
<div>
10+
<h1 className="font-medium">Project ready!</h1>
11+
<p>You may now add components and start building.</p>
12+
<p>We&apos;ve already added the button component for you.</p>
13+
<Button className="mt-2">Button</Button>
14+
</div>
15+
<div className="text-muted-foreground font-mono text-xs">
16+
(Press <kbd>d</kbd> to toggle dark mode)
17+
<p>{add(1, 2)}</p>
18+
</div>
19+
<Input/>
20+
</div>
21+
</div>
22+
)
23+
}

apps/widget/components.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "radix-nova",
4+
"rsc": true,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "",
8+
"css": "../../packages/ui/src/styles/globals.css",
9+
"baseColor": "neutral",
10+
"cssVariables": true
11+
},
12+
"iconLibrary": "lucide",
13+
"aliases": {
14+
"components": "@/components",
15+
"hooks": "@/hooks",
16+
"lib": "@/lib",
17+
"utils": "@workspace/ui/lib/utils",
18+
"ui": "@workspace/ui/components"
19+
},
20+
"rtl": false,
21+
"menuColor": "default",
22+
"menuAccent": "subtle"
23+
}

apps/widget/components/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)