mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-07-07 14:08:47 +00:00
chore(www): switch to contentlayer2 (#4292)
* chore(www): switch to contentlayer2 * chore: rebuild registry * fix: build
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
import * as React from "react"
|
||||
import Image from "next/image"
|
||||
import Link from "next/link"
|
||||
import { useMDXComponent } from "next-contentlayer/hooks"
|
||||
import { useMDXComponent } from "next-contentlayer2/hooks"
|
||||
import { NpmCommands } from "types/unist"
|
||||
|
||||
import { Event } from "@/lib/events"
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
defineDocumentType,
|
||||
defineNestedType,
|
||||
makeSource,
|
||||
} from "contentlayer/source-files"
|
||||
} from "contentlayer2/source-files"
|
||||
import rehypeAutolinkHeadings from "rehype-autolink-headings"
|
||||
import rehypePrettyCode from "rehype-pretty-code"
|
||||
import rehypeSlug from "rehype-slug"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { createContentlayerPlugin } from "next-contentlayer"
|
||||
import { createContentlayerPlugin } from "next-contentlayer2"
|
||||
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
|
||||
@@ -5,15 +5,15 @@
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "next dev -p 3003",
|
||||
"build": "contentlayer build && pnpm build:registry && next build",
|
||||
"build": "contentlayer2 build && pnpm build:registry && next build",
|
||||
"build:registry": "tsx --tsconfig ./tsconfig.scripts.json ./scripts/build-registry.mts && prettier --loglevel silent --write \"registry/**/*.{ts,tsx,mdx}\" --cache",
|
||||
"build:docs": "contentlayer build",
|
||||
"build:docs": "contentlayer2 build",
|
||||
"seed:tasks": "tsx --tsconfig ./tsconfig.scripts.json ./app/(app)/examples/tasks/data/seed.ts",
|
||||
"start": "next start -p 3001",
|
||||
"lint": "next lint",
|
||||
"lint:fix": "next lint --fix",
|
||||
"preview": "next build && next start -p 3001",
|
||||
"typecheck": "contentlayer build && tsc --noEmit",
|
||||
"typecheck": "contentlayer2 build && tsc --noEmit",
|
||||
"format:write": "prettier --write \"**/*.{ts,tsx,mdx}\" --cache",
|
||||
"format:check": "prettier --check \"**/*.{ts,tsx,mdx}\" --cache"
|
||||
},
|
||||
@@ -28,7 +28,7 @@
|
||||
"@radix-ui/react-checkbox": "^1.0.4",
|
||||
"@radix-ui/react-collapsible": "^1.0.3",
|
||||
"@radix-ui/react-context-menu": "^2.1.4",
|
||||
"@radix-ui/react-dialog": "^1.0.4",
|
||||
"@radix-ui/react-dialog": "^1.1.1",
|
||||
"@radix-ui/react-dropdown-menu": "^2.0.5",
|
||||
"@radix-ui/react-hover-card": "^1.0.6",
|
||||
"@radix-ui/react-icons": "^1.3.0",
|
||||
@@ -56,7 +56,7 @@
|
||||
"class-variance-authority": "^0.7.0",
|
||||
"clsx": "^1.2.1",
|
||||
"cmdk": "^0.2.0",
|
||||
"contentlayer": "0.3.4",
|
||||
"contentlayer2": "^0.4.6",
|
||||
"date-fns": "^2.30.0",
|
||||
"embla-carousel-autoplay": "8.0.0-rc15",
|
||||
"embla-carousel-react": "8.0.0-rc15",
|
||||
@@ -68,7 +68,7 @@
|
||||
"lucide-react": "0.359.0",
|
||||
"markdown-wasm": "^1.2.0",
|
||||
"next": "14.3.0-canary.43",
|
||||
"next-contentlayer": "0.3.4",
|
||||
"next-contentlayer2": "^0.4.6",
|
||||
"next-themes": "^0.2.1",
|
||||
"react": "^18.2.0",
|
||||
"react-day-picker": "^8.7.1",
|
||||
@@ -82,7 +82,7 @@
|
||||
"swr": "2.2.6-beta.3",
|
||||
"tailwind-merge": "^1.12.0",
|
||||
"ts-morph": "^22.0.0",
|
||||
"vaul": "^0.9.1",
|
||||
"vaul": "0.9.0",
|
||||
"zod": "^3.21.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -102,11 +102,11 @@
|
||||
"rehype-slug": "^5.1.0",
|
||||
"remark": "^14.0.3",
|
||||
"remark-code-import": "^1.2.0",
|
||||
"remark-gfm": "^3.0.1",
|
||||
"remark-gfm": "^4.0.0",
|
||||
"rimraf": "^4.1.3",
|
||||
"shiki": "^1.10.1",
|
||||
"tailwindcss": "3.3.7",
|
||||
"typescript": "^5.4.2",
|
||||
"typescript": "^5.5.3",
|
||||
"unist-builder": "3.0.0",
|
||||
"unist-util-visit": "^4.1.2"
|
||||
},
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -33,5 +33,5 @@
|
||||
".next/types/**/*.ts",
|
||||
".contentlayer/generated"
|
||||
],
|
||||
"exclude": ["node_modules", "./scripts/build-registry.mts"]
|
||||
"exclude": ["node_modules", "./scripts/build-registry.mts", "__registry__"]
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
"dev": "turbo run dev --parallel",
|
||||
"cli:dev": "turbo --filter=shadcn-ui dev",
|
||||
"cli:start": "pnpm --filter=shadcn-ui start:dev",
|
||||
"docs:build": "pnpm --filter=www build:docs",
|
||||
"www:dev": "pnpm --filter=www dev",
|
||||
"www:build": "pnpm --filter=www build",
|
||||
"lint": "turbo run lint",
|
||||
@@ -70,6 +71,6 @@
|
||||
"@types/node": "^20.11.27",
|
||||
"@types/react": "^18.2.65",
|
||||
"@types/react-dom": "^18.2.22",
|
||||
"typescript": "^5.4.2"
|
||||
"typescript": "^5.5.3"
|
||||
}
|
||||
}
|
||||
|
||||
15781
pnpm-lock.yaml
generated
15781
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -41,6 +41,6 @@
|
||||
"postcss": "^8.4.24",
|
||||
"prettier": "^2.8.8",
|
||||
"tailwindcss": "3.3.7",
|
||||
"typescript": "^5.4.2"
|
||||
"typescript": "^5.5.3"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user