build command compiles local component source files into a shadcn-compatible JSON registry distribution. It automatically validates definitions, reads component code from disk, embeds source contents into registry schemas, and outputs individual component JSON files alongside a catalog index.
Usage
registry namespace alias:
Quick Examples
What It Produces
When executed,build generates:
-
Component Artifacts (
[name].json): For each item defined inregistry.json, an individual JSON schema file is generated under--outputcontaining:- Metadata (
name,type,title,description). - Declared
dependencies,devDependencies, andregistryDependencies. - Embedded file contents (
files: [{ path, content, target, type }]). - CSS payloads and variable definitions (
css,cssVars).
- Metadata (
-
Catalog Index (
registry.json): A top-level registry catalog placed at the root of the output directory containing metadata and summaries for all components, ready to be hosted as a public registry endpoint.
Options
--output, -o <path>
Destination directory where JSON distribution files will be generated.
(Default: public/r)