Skip to content

Contributing Code

Thanks for your interest in contributing to Niko Table.

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.

This repository is an Astro Starlight project.

  • We use pnpm for development (npm also works).
  • We use prettier for code formatting (which is automatically run on commit).

This repository is structured as follows:

  • Directorysrc
    • Directoryassets/
    • Directorycomponents/
    • Directorycontent/docs
      • Directorygetting-started/
      • Directoryniko-table/
      • Directorydata-grid/
      • Directoryexamples/
      • Directorycontributing/
    • Directoryregistry/new-york
      • Directoryexamples/
    • Directorycomponents/niko-table/
  • src/assets: Logos/images for the documentation site.
  • src/components: Site UI (markdown helpers, overrides, etc.).
  • src/content/docs/getting-started: Install and intro guides.
  • src/content/docs/niko-table / data-grid: Product overview + API by layer.
  • src/content/docs/examples: Runnable table and grid example pages.
  • src/content/docs/contributing: How to contribute (code, requests, docs).
  • src/registry/new-york/examples: Demo components mounted by CodePreview.
  • src/components/niko-table: Installable component sources, packaged by the root registry.json.

For docs/example page shape, see Documentation Guidelines.

  1. Fork the repository

  2. Clone on your local machine

    git clone git@github.com:Semkoo/niko-table-registry.git
  3. Navigate to project directory

    cd niko-table-registry
  4. Create a new Branch

    git checkout -b my-new-branch
  5. Install dependencies

    pnpm install
    # or
    npm install
  6. Copy .env.example to .env

    cp .env.example .env
  7. Run the development server

    pnpm dev
    # or
    npm run dev

To test that your registry builds correctly, you can run the following command:

pnpm registry:build
# or
npm run 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