smart-registry 0.6.4 → 0.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -15
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -99,7 +99,25 @@ If your project contains a `registry`, `components`, or `src/components` directo
|
|
|
99
99
|
npx smart-registry
|
|
100
100
|
```
|
|
101
101
|
|
|
102
|
-
|
|
102
|
+
```plaintext
|
|
103
|
+
Version:
|
|
104
|
+
${name}@${version}
|
|
105
|
+
|
|
106
|
+
Usage:
|
|
107
|
+
$ ${name} [options] [files/directories] ...
|
|
108
|
+
|
|
109
|
+
Arguments:
|
|
110
|
+
files/directories files or directories to build the registry from (optional)
|
|
111
|
+
|
|
112
|
+
Options:
|
|
113
|
+
-o, --output <path> destination directory for json files (default: "./public/r")
|
|
114
|
+
-c, --cwd <cwd> the working directory (default: "./")
|
|
115
|
+
-v, --version display version
|
|
116
|
+
-h, --help display help
|
|
117
|
+
|
|
118
|
+
Author:
|
|
119
|
+
${author.name} <${author.email}> (${author.url})
|
|
120
|
+
```
|
|
103
121
|
|
|
104
122
|
### From Specific Files or Directories
|
|
105
123
|
|
|
@@ -123,9 +141,9 @@ registry/
|
|
|
123
141
|
└── dialog.tsx
|
|
124
142
|
```
|
|
125
143
|
|
|
126
|
-
1. `Smart Registry` will scan the `registry` directory and its sub-directories to find all the files
|
|
144
|
+
1. `Smart Registry` will scan the `registry` directory and its sub-directories to find all the files (if no `registry` directory is found, it will scan the `components` or `src/components` directory).
|
|
127
145
|
2. For each file, it will generate a `<registry-item>.json` file by reading the file's content and extracting the imports for registry dependencies, dependencies, and files recursively.
|
|
128
|
-
3. It will then generate a `registry.json` file by combining all the `<registry-item>.json` files with all the properties required for `shadcn add` or `open in v0`.
|
|
146
|
+
3. It will then generate a `registry.json` file by combining all the `<registry-item>.json` files and `<registry-item>.json` files with all the properties required for `shadcn add` or `open in v0`.
|
|
129
147
|
|
|
130
148
|
```plaintext
|
|
131
149
|
public/
|
|
@@ -439,12 +457,13 @@ Generates the following items in `public/r` directory.
|
|
|
439
457
|
```plaintext
|
|
440
458
|
public/
|
|
441
459
|
└── r/
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
460
|
+
├── registry.json
|
|
461
|
+
└── new-york/
|
|
462
|
+
├── toasty.json name: new-york/toasty target: blocks/new-york/toasty.tsx
|
|
463
|
+
├── toaster.json name: new-york/toaster target: components/new-york/toaster.tsx
|
|
464
|
+
├── use-toast.json name: new-york/use-toast target: hooks/new-york/use-toast.ts
|
|
465
|
+
├── utils.json name: new-york/utils target: lib/new-york/utils.ts
|
|
466
|
+
└── toast.json name: new-york/toast target: components/ui/new-york/toast.tsx
|
|
448
467
|
```
|
|
449
468
|
|
|
450
469
|
### For `components` directory.
|
|
@@ -469,6 +488,7 @@ Generates the following items in `public/r` directory.
|
|
|
469
488
|
```plaintext
|
|
470
489
|
public/
|
|
471
490
|
└── r/
|
|
491
|
+
├── registry.json
|
|
472
492
|
├── toasty.json name: toasty target: blocks/toasty.tsx
|
|
473
493
|
├── component.json name: toaster target: components/toaster.tsx
|
|
474
494
|
├── use-toast.json name: use-toast target: hooks/use-toast.ts
|
|
@@ -503,10 +523,11 @@ Generates the following items in `public/r` directory.
|
|
|
503
523
|
```plaintext
|
|
504
524
|
public/
|
|
505
525
|
└── r/
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
526
|
+
├── registry.json
|
|
527
|
+
└── new-york/
|
|
528
|
+
├── toasty.json name: new-york/toasty target: blocks/new-york/toasty.tsx
|
|
529
|
+
├── toaster.json name: new-york/toaster target: components/new-york/toaster.tsx
|
|
530
|
+
├── use-toast.json name: new-york/use-toast target: hooks/new-york/use-toast.ts
|
|
531
|
+
├── utils.json name: new-york/utils target: lib/new-york/utils.ts
|
|
532
|
+
└── toast.json name: new-york/toast target: components/ui/new-york/toast.tsx
|
|
512
533
|
```
|