Contributing Code
How to set up the repo and send a pull request.
Read this page before your first pull request. Also check open issues and pull requests. Someone may already be working on the same thing.
About this repository
Section titled “About this repository”This repository is an Astro Starlight project.
- We use
pnpmfor development (npm also works). - We use
prettierfor code formatting. It runs on commit.
Structure
Section titled “Structure”The repo is laid out like this:
Directorysrc
Directoryassets/
- …
Directorycomponents/
- …
Directorycontent/docs
Directorygetting-started/
- …
Directoryniko-table/
- …
Directorydata-grid/
- …
Directoryexamples/
- …
Directorycontributing/
- …
Directoryregistry/new-york
Directoryexamples/
- …
Directorycomponents/niko-table/
- …
src/assets: Logos and images for the docs site.src/components: Site UI (markdown helpers, overrides, etc.).src/content/docs/getting-started: Install and intro guides.src/content/docs/niko-tableanddata-grid: Overview and API, by layer.src/content/docs/examples: Table and grid example pages you can run.src/content/docs/contributing: How to help (code, requests, docs).src/registry/new-york/examples: Demo components thatCodePreviewshows.src/components/niko-table: Component sources people install. The rootregistry.jsonpackages them.
For how to shape docs and example pages, see Documentation Guidelines.
Development
Section titled “Development”-
Clone on your local machine
-
Navigate to project directory
cd niko-table-registry -
Create a new Branch
git checkout -b my-new-branch -
Install dependencies
pnpm install# ornpm install -
Copy
.env.exampleto.envcp .env.example .env -
Run the development server
pnpm dev# ornpm run dev
Building the registry locally
Section titled “Building the registry locally”To check that the registry builds, run:
pnpm registry:build# ornpm run registry:buildThen install any component from it in a new project with shadcn add:
npx shadcn@latest add http://localhost:4321/r/<component-name>.json