smart-registry 0.6.3 → 0.6.4

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.
Files changed (2) hide show
  1. package/README.md +12 -19
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -71,7 +71,7 @@ Simplify your `registry.json` by removing properties like `registryDependencies`
71
71
 
72
72
  <br/>
73
73
 
74
- Manual maintenance of `registry.json` files can lead to errors due to missing dependencies or files, or wrongful addition of unnecessary ones. `Smart Registry` reduces these risks by automating the detection and generation of the necessary `registry.json` and `r/<registry-item>.json` entries, making registry management more efficient.
74
+ Manual maintenance of `registry.json` files can lead to errors due to missing dependencies or files, or wrongful addition of unnecessary ones. `Smart Registry` reduces these risks by automating the detection and generation of the all-in-one `r/registry.json` and `r/<registry-item>.json` entries, making registry management more efficient.
75
75
 
76
76
  ## Table of Contents
77
77
 
@@ -101,20 +101,12 @@ npx smart-registry
101
101
 
102
102
  ![Demo Image](https://github-production-user-asset-6210df.s3.amazonaws.com/58145505/418180611-fd6070a5-6a89-4582-8ad0-df125c222883.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20250302%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250302T212923Z&X-Amz-Expires=300&X-Amz-Signature=81a0324e67c77ab068c96e9f666e1b930cf32d497f8aa0a39c28caa0b902c7d3&X-Amz-SignedHeaders=host)
103
103
 
104
- ### From Specific Files
104
+ ### From Specific Files or Directories
105
105
 
106
- If you want to generate the registry from specific files, you can use the `-f` flag to specify the files.
106
+ If you want to generate the registry from specific files or directories, you can pass them as arguments.
107
107
 
108
108
  ```bash
109
- npx smart-registry -f <file1> -f <file2> -f <file3> ...
110
- ```
111
-
112
- ### From Specific Directories
113
-
114
- To generate the registry from specific directories, use the `-d` flag to specify the directories.
115
-
116
- ```bash
117
- npx smart-registry -d <directory1> -d <directory2> -d <directory3> ...
109
+ npx smart-registry path/to/file.ts path/to/directory ...
118
110
  ```
119
111
 
120
112
  ## How it Works
@@ -131,17 +123,18 @@ registry/
131
123
  └── dialog.tsx
132
124
  ```
133
125
 
134
- 1. `Smart Registry` will scan the `registry` directory for files.
126
+ 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.
135
127
  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.
136
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`.
137
129
 
138
130
  ```plaintext
139
131
  public/
140
- ├── r/
141
- ├── button.json
142
- ├── dialog.json
143
- │ └── utils.json
144
- └── registry.json
132
+ └── r/
133
+ ├── button.json
134
+ ├── dialog.json
135
+ ├── registry.json
136
+ └── utils.json
137
+
145
138
  ```
146
139
 
147
140
  ## Extending Properties
@@ -510,7 +503,7 @@ Generates the following items in `public/r` directory.
510
503
  ```plaintext
511
504
  public/
512
505
  └── r/
513
- ├── new-york/
506
+ └── new-york/
514
507
  ├── toasty.json name: new-york/toasty target: blocks/new-york/toasty.tsx
515
508
  ├── toaster.json name: new-york/toaster target: components/new-york/toaster.tsx
516
509
  ├── use-toast.json name: new-york/use-toast target: hooks/new-york/use-toast.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "smart-registry",
3
- "version": "0.6.3",
3
+ "version": "0.6.4",
4
4
  "description": "A zero-configuration (no registry.json required), shadcn add / open in v0 compatible registry builder.",
5
5
  "keywords": [
6
6
  "smart-registry"