Skip to content

Commit 7ed6702

Browse files
committed
find and replace to handle directory bug
1 parent 49c2e82 commit 7ed6702

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

add

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ if [ -d "src/components/ui/$COMPONENT" ]; then
3131
# this is a necessary workaround because shadcn-vue won't write
3232
# to src/components due to a bug (refer to components.json)
3333
echo "Moving files from src/components/ui to src/components"
34+
# find and replace "components/ui" with "components" in UI directory
35+
find src/components/ui -type f -exec sed -i '' 's|components/ui|components|g' {} +
36+
3437
rsync -a src/components/ui/ src/components/
3538
rm -r src/components/ui
3639

components.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"components": "@/components",
1414
"composables": "@/composables",
1515
"utils": "@/lib/utils",
16-
"ui": "@/components",
16+
"ui": "@/components/ui",
1717
"lib": "@/lib"
1818
},
1919
"iconLibrary": "lucide"

0 commit comments

Comments
 (0)