Contributing Code
Thanks for your interest in contributing to WDS Shadcn Registry.
Please take a moment to review this document before submitting your first pull request. We also strongly recommend that you check for open issues and pull requests to see if someone else is working on something similar.
About this repository
Section titled “About this repository”This repository is an Astro Starlight project.
- We use
npm
for development. - We use
prettier
for code formatting (which is automatically run on commit).
Structure
Section titled “Structure”This repository is structured as follows:
Directorysrc
Directoryassets/
- …
Directorycomponents/
- …
Directorycontent/docs
Directorycomponents/
- …
Directorygetting-started/
- …
Directorycontributing/
- …
Directoryregistry/new-york
Directoryexamples/
- …
Directoryitems/
- …
src/assets
: Any logos/images for the documentation site.src/components
: Components used to create the documentation site.src/content/docs/components
: Individual documentation pages for each component.src/content/getting-started
: One-off guides for the getting started section of the documentation.src/content/docs/contributing
: Documentation for contributing to the registry.src/registry/new-york/examples
: Example files used for rendering in the documentation pages for each component.src/registry/new-york/items
: The implementation of the component that will be installed in the user’s project.
Development
Section titled “Development”-
Clone on your local machine
git clone git@github.com:WebDevSimplified/wds-shadcn-registry.git -
Navigate to project directory
cd wds-shadcn-registry -
Create a new Branch
git checkout -b my-new-branch -
Install dependencies
npm i -
Run the development server
npm run dev
Building the registry locally
Section titled “Building the registry locally”To test that your registry builds correctly, you can run the following command:
npm registry:build
Then try installing any component from the registry in a new project using the shadcn add
command:
npx shadcn@latest add http://localhost:4321/r/<component-name>.json