Skip to content

Commit 4f6d67f

Browse files
committed
feat: ui:add component script
1 parent 6767913 commit 4f6d67f

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ cd turborepo-shadcn-ui
2020
pnpm install
2121
```
2222

23+
### Add ui components
24+
25+
Use the pre-made script:
26+
27+
```sh
28+
pnpm ui:add <component-name>
29+
```
30+
31+
> This works just like the add command in the `shadcn/ui` CLI.
32+
2333
## What's inside?
2434

2535
This Turborepo includes the following packages/apps:

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{
22
"name": "turborepo-shadcn-ui",
3-
"version": "0.0.1",
3+
"version": "0.1.1",
44
"private": true,
55
"scripts": {
66
"build": "turbo run build",
77
"dev": "turbo run dev",
88
"lint": "turbo run lint",
9-
"format": "prettier --write \"**/*.{ts,tsx,md}\""
9+
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
10+
"ui:add": "pnpm --filter ui ui:add"
1011
},
1112
"devDependencies": {
1213
"@turbo/gen": "^1.9.7",

packages/ui/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"types": "./index.tsx",
66
"license": "MIT",
77
"scripts": {
8-
"lint": "eslint \"**/*.ts*\""
8+
"lint": "eslint \"**/*.ts*\"",
9+
"ui:add": "pnpm dlx shadcn-ui add"
910
},
1011
"devDependencies": {
1112
"@types/react": "^18.2.0",

0 commit comments

Comments
 (0)