Fix init command for default style - fixes #4722 (#4724)

* Fix init command for default style

The empty dependency string was tripping up package managers.

* fix(www): registry dependencies for default

---------

Co-authored-by: shadcn <m@shadcn.com>
This commit is contained in:
adrianhelvikspond
2024-09-03 20:21:51 +02:00
committed by GitHub
parent faa7a67fb3
commit 4e4118f3cf
2 changed files with 13 additions and 9 deletions

View File

@@ -4,8 +4,7 @@
"dependencies": [
"tailwindcss-animate",
"class-variance-authority",
"lucide-react",
""
"lucide-react"
],
"registryDependencies": [
"utils"

View File

@@ -426,16 +426,21 @@ async function buildStylesIndex() {
for (const style of styles) {
const targetPath = path.join(REGISTRY_PATH, "styles", style.name)
const dependencies = [
"tailwindcss-animate",
"class-variance-authority",
"lucide-react",
]
// TODO: Remove this when we migrate to lucide-react.
if (style.name === "new-york") {
dependencies.push("@radix-ui/react-icons")
}
const payload: RegistryEntry = {
name: style.name,
type: "registry:style",
dependencies: [
"tailwindcss-animate",
"class-variance-authority",
"lucide-react",
// TODO: Remove this when we migrate to lucide-react.
style.name === "new-york" ? "@radix-ui/react-icons" : "",
],
dependencies,
registryDependencies: ["utils"],
tailwind: {
config: {