Skip to content

Commit 9b47219

Browse files
committed
Initial commit
0 parents  commit 9b47219

45 files changed

Lines changed: 5710 additions & 0 deletions

Some content is hidden

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

.eslintrc.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// This configuration only applies to the package manager root.
2+
/** @type {import("eslint").Linter.Config} */
3+
module.exports = {
4+
ignorePatterns: ["apps/**", "packages/**"],
5+
extends: ["@workspace/eslint-config/library.js"],
6+
parser: "@typescript-eslint/parser",
7+
parserOptions: {
8+
project: true,
9+
},
10+
}

.gitignore

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# Dependencies
4+
node_modules
5+
.pnp
6+
.pnp.js
7+
8+
# Local env files
9+
.env
10+
.env.local
11+
.env.development.local
12+
.env.test.local
13+
.env.production.local
14+
15+
# Testing
16+
coverage
17+
18+
# Turbo
19+
.turbo
20+
21+
# Vercel
22+
.vercel
23+
24+
# Build Outputs
25+
.next/
26+
out/
27+
build
28+
dist
29+
30+
31+
# Debug
32+
npm-debug.log*
33+
34+
# Misc
35+
.DS_Store
36+
*.pem

.npmrc

Whitespace-only changes.

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"tailwindCSS.experimental.configFile": "packages/ui/src/styles/globals.css"
3+
}

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# shadcn/ui monorepo template
2+
3+
This template is for creating a monorepo with shadcn/ui.
4+
5+
## Usage
6+
7+
```bash
8+
pnpm dlx shadcn@latest init
9+
```
10+
11+
## Adding components
12+
13+
To add components to your app, run the following command at the root of your `web` app:
14+
15+
```bash
16+
pnpm dlx shadcn@latest add button -c apps/web
17+
```
18+
19+
This will place the ui components in the `packages/ui/src/components` directory.
20+
21+
## Tailwind
22+
23+
Your `tailwind.config.ts` and `globals.css` are already set up to use the components from the `ui` package.
24+
25+
## Using components
26+
27+
To use the components in your app, import them from the `ui` package.
28+
29+
```tsx
30+
import { Button } from "@workspace/ui/components/button"
31+
```

apps/web/app/favicon.ico

25.3 KB
Binary file not shown.

apps/web/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/globals.css"
4+
import { Providers } from "@/components/providers"
5+
6+
const fontSans = Geist({
7+
subsets: ["latin"],
8+
variable: "--font-sans",
9+
})
10+
11+
const fontMono = Geist_Mono({
12+
subsets: ["latin"],
13+
variable: "--font-mono",
14+
})
15+
16+
export default function RootLayout({
17+
children,
18+
}: Readonly<{
19+
children: React.ReactNode
20+
}>) {
21+
return (
22+
<html lang="en" suppressHydrationWarning>
23+
<body
24+
className={`${fontSans.variable} ${fontMono.variable} font-sans antialiased `}
25+
>
26+
<Providers>{children}</Providers>
27+
</body>
28+
</html>
29+
)
30+
}

apps/web/app/page.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { Button } from "@workspace/ui/components/button"
2+
3+
export default function Page() {
4+
return (
5+
<div className="flex items-center justify-center min-h-svh">
6+
<div className="flex flex-col items-center justify-center gap-4">
7+
<h1 className="text-2xl font-bold">Hello World</h1>
8+
<Button size="sm">Button</Button>
9+
</div>
10+
</div>
11+
)
12+
}

apps/web/components.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "new-york",
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+
}

apps/web/components/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)