mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-06-11 09:51:40 +00:00
@@ -1,6 +1,8 @@
|
||||
// @ts-nocheck
|
||||
// This file is autogenerated by scripts/build-registry.mts
|
||||
// Do not edit this file directly.
|
||||
import "server-only"
|
||||
|
||||
import * as React from "react"
|
||||
|
||||
export const ExamplesIndex: Record<string, Record<string, any>> = {
|
||||
|
||||
@@ -29,9 +29,6 @@ const nextConfig = {
|
||||
turbopack: {
|
||||
root: path.resolve(import.meta.dirname, "../.."),
|
||||
},
|
||||
experimental: {
|
||||
turbopackFileSystemCacheForDev: true,
|
||||
},
|
||||
redirects() {
|
||||
return [
|
||||
// Form redirects to /docs/forms.
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
"format:write": "prettier --write \"**/*.{ts,tsx,mdx}\" --cache",
|
||||
"format:check": "prettier --check \"**/*.{ts,tsx,mdx}\" --cache",
|
||||
"icons:dev": "tsx --tsconfig ./tsconfig.scripts.json ./scripts/build-icons.ts --watch",
|
||||
"registry:build": "pnpm --filter=shadcn build && bun run ./scripts/build-registry.mts",
|
||||
"registry:capture": "tsx --tsconfig ./tsconfig.scripts.json ./scripts/capture-registry.mts",
|
||||
"registry:build": "pnpm --filter=shadcn build && bun --conditions=react-server run ./scripts/build-registry.mts",
|
||||
"registry:capture": "tsx --conditions=react-server --tsconfig ./tsconfig.scripts.json ./scripts/capture-registry.mts",
|
||||
"explore:capture": "tsx --tsconfig ./tsconfig.scripts.json ./scripts/capture-explore.mts",
|
||||
"validate:registries": "tsx --tsconfig ./tsconfig.scripts.json ./scripts/validate-registries.mts",
|
||||
"test:apps": "bun run ./scripts/build-test-app.mts",
|
||||
@@ -61,7 +61,7 @@
|
||||
"lru-cache": "^11.2.4",
|
||||
"lucide-react": "0.474.0",
|
||||
"motion": "^12.12.1",
|
||||
"next": "16.1.6",
|
||||
"next": "16.2.7",
|
||||
"next-themes": "0.4.6",
|
||||
"nuqs": "^2.8.9",
|
||||
"postcss": "^8.5.1",
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// @ts-nocheck
|
||||
// This file is autogenerated by scripts/build-registry.ts
|
||||
// Do not edit this file directly.
|
||||
import "server-only"
|
||||
|
||||
import * as React from "react"
|
||||
|
||||
export const Index: Record<string, Record<string, any>> = {
|
||||
|
||||
@@ -61,7 +61,7 @@ function scanIconUsage() {
|
||||
function generateIconFiles(iconUsage: IconUsage) {
|
||||
const outputDir = path.join(process.cwd(), "registry/icons")
|
||||
|
||||
console.log("✓ Generated icon files:")
|
||||
const written: string[] = []
|
||||
|
||||
Object.entries(iconLibraries).forEach(([libraryName, config]) => {
|
||||
const icons = Array.from(iconUsage[libraryName as IconLibraryName]).sort()
|
||||
@@ -75,10 +75,25 @@ ${icons.map((icon) => `export { ${icon} } from "${config.export}"`).join("\n")}
|
||||
`
|
||||
|
||||
const filename = `__${libraryName}__.ts`
|
||||
fs.writeFileSync(path.join(outputDir, filename), content)
|
||||
const filepath = path.join(outputDir, filename)
|
||||
|
||||
console.log(` - ${config.title}: ${icons.length} icons`)
|
||||
// Skip unchanged files to avoid mtime bumps that trigger
|
||||
// unnecessary Turbopack invalidations in watch mode.
|
||||
if (
|
||||
fs.existsSync(filepath) &&
|
||||
fs.readFileSync(filepath, "utf-8") === content
|
||||
) {
|
||||
return
|
||||
}
|
||||
|
||||
fs.writeFileSync(filepath, content)
|
||||
written.push(` - ${config.title}: ${icons.length} icons`)
|
||||
})
|
||||
|
||||
if (written.length > 0) {
|
||||
console.log("✓ Generated icon files:")
|
||||
written.forEach((line) => console.log(line))
|
||||
}
|
||||
}
|
||||
|
||||
function main() {
|
||||
|
||||
@@ -1019,6 +1019,7 @@ async function buildExamplesIndex() {
|
||||
let index = `// @ts-nocheck
|
||||
// This file is autogenerated by scripts/build-registry.mts
|
||||
// Do not edit this file directly.
|
||||
import "server-only"
|
||||
import * as React from "react"
|
||||
|
||||
export const ExamplesIndex: Record<string, Record<string, any>> = {`
|
||||
@@ -1065,6 +1066,7 @@ async function buildRegistryIndex(styles: { name: string; title: string }[]) {
|
||||
let index = `// @ts-nocheck
|
||||
// This file is autogenerated by scripts/build-registry.ts
|
||||
// Do not edit this file directly.
|
||||
import "server-only"
|
||||
import * as React from "react"
|
||||
|
||||
export const Index: Record<string, Record<string, any>> = {`
|
||||
|
||||
Reference in New Issue
Block a user