Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Latest commit

 

History

History
161 lines (114 loc) · 5.07 KB

CONTRIBUTING.md

File metadata and controls

161 lines (114 loc) · 5.07 KB

Contributing

This CONTRIBUTING.md is a shallow copy of shadcn/ui's CONTRIBUTING.md. Some information might not be true yet, but the goal is to get as close as possible.

Thanks for your interest in contributing to qwikcn. We're happy to have you here.

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.

If you need any help, feel free to reach out to @maiieul.

About this repository

This repository is a monorepo.

Structure

This repository is structured as follows:

apps
└── www
    ├── app
    ├── components
    ├── content
    └── registry
        ├── default
        │   ├── example
        │   └── ui
        └── new-york
            ├── example
            └── ui
packages
└── cli
Path Description
apps/www/app The Next.js application for the website.
apps/www/components The React components for the website.
apps/www/content The content for the website.
apps/www/registry The registry for the components.
packages/cli The shadcn-ui package.

Development

Start by cloning the repository:

git clone git@github.com:x-ploration-of-mars/qwikcn.git

Install dependencies

pnpm install

Run a workspace

You can use the pnpm --filter=[WORKSPACE] command to start the development process for a workspace.

Examples

  1. To run the qwikcn.xyz website:
pnpm --filter=www dev
  1. To run the qwikcn package:
pnpm --filter=qwikcn dev

Documentation

The documentation for this project is located in the www workspace. You can run the documentation locally by running the following command:

pnpm --filter=www dev

Documentation is written using MDX. You can find the documentation files in the apps/www/content/docs directory.

Components

We use a registry system for developing components. You can find the source code for the components under apps/www/registry. The components are organized by styles.

apps
└── www
    └── registry
        ├── default
        │   ├── example
        │   └── ui
        └── new-york
            ├── example
            └── ui

When adding or modifying components, please ensure that:

  1. You make the changes for every style.
  2. You update the documentation.
  3. You run pnpm build:registry to update the registry.

Commit Convention

Before you create a Pull Request, please check whether your commits comply with the commit conventions used in this repository.

When you create a commit we kindly ask you to follow the convention category(scope or module): message in your commit message while using one of the following categories:

  • feat / feature: all changes that introduce completely new code or new features

  • fix: changes that fix a bug (ideally you will additionally reference an issue if present)

  • refactor: any code related change that is not a fix nor a feature

  • docs: changing existing or creating new documentation (i.e. README, docs for usage of a lib or cli usage)

  • build: all changes regarding the build of the software, changes to dependencies or the addition of new dependencies

  • test: all changes regarding tests (adding new tests or changing existing ones)

  • ci: all changes regarding the configuration of continuous integration (i.e. github actions, ci system)

  • chore: all changes to the repository that do not fit into any of the above categories

    e.g. feat(components): add new prop to the avatar component

If you are interested in the detailed specification you can visit https://www.conventionalcommits.org/ or check out the Angular Commit Message Guidelines.

Requests for new components

If you have a request for a new component, please open a discussion on GitHub.

CLI

The qwikcn package is a CLI for adding components to your project. You can find the documentation for the CLI here.

Any changes to the CLI should be made in the packages/cli directory. If you can, it would be great if you could add tests for your changes.

Testing

Tests are written using Vitest. You can run all the tests from the root of the repository.

pnpm test

Please ensure that the tests are passing when submitting a pull request. If you're adding new features, please include tests.