This application is used for developing and publishing new components that can be installed by running the shadcn cli.
npx shadcn init # initialize shadcn
npx shadcn add http://ui.reactflow.dev/<component-name>.json ## adding componentWe have an initialization script that can be run via
pnpm add-component <component-name>This adds the following files:
components/
ββ xy/
β ββ <component-name>/
β β ββ index.tsx # source code of the component
β β ββ demo.tsx # small demo showing usage to appear on website
β β ββ registry.json # shadcn configuration
app/
ββ <component-name>/
β ββ page.tsx # route for rendering component
Inside the scripts/ folder you will find a script called generate-registry.js. This script is executed when running pnpm build. It generates registry files for the cli (regsitry/<component-name>.json), as well as a demo/<component-name>.json file with the example code for each component and saves them inside the public/ folder. This way by building and deploying the app we can directly host all neccessary files needed for the cli and integrating it with our website.