docs(README): add and improve contributing guide, local development guide (#860)

This commit is contained in:
Levi (Nguyễn Lương Huy)
2023-11-22 16:20:44 +07:00
committed by GitHub
parent d39e2de935
commit 10ec3d533e
2 changed files with 36 additions and 34 deletions

View File

@@ -9,7 +9,7 @@ Nuxt UI thrives thanks to its fantastic community ❤️, which contributes by s
Before reporting a bug or reporting a feature, please make sure that you have read through our documentation and existing [issues](https://github.com/nuxt/ui/issues).
## Submitting a Pull Request
## Submitting a Pull Request (PR)
### 1. Before You Start
@@ -27,22 +27,33 @@ To begin local development, follow these steps:
git clone https://github.com/nuxt/ui.git
```
2. Install dependencies and prepare the project:
2. Enable [Corepack](https://github.com/nodejs/corepack):
```sh
corepack enable
```
3. Install dependencies:
```sh
pnpm install
```
4. Generate type stubs:
```sh
pnpm run dev:prepare
```
3. To configure your local development environment, use the following commands:
5. Configure your local development environment:
- To work on the **documentation** in the `docs` folder, run:
- To work on the **documentation** located in the `docs` folder, run:
```sh
pnpm run dev
```
- To test the components located in the `playground` folder within `app.vue`, run:
- To test the components using **playground**, run:
```sh
pnpm run play
@@ -84,46 +95,26 @@ pnpm run typecheck
### 3. Commit Conventions
Use Conventional Commits for commit messages with the following format:
We use [Conventional Commits](https://www.conventionalcommits.org/) for commit messages, which allows a changelog to be auto-generated based on the commits. Please read the [guide](https://www.conventionalcommits.org/en/v1.0.0/#summary) through if you aren't familiar with it already.
```
<type>(optional scope): <description>
#### Note
[optional body]
- `fix` and `feat` are for actual code changes (that might affect logic). For typo or document changes, use `docs` or `chore` instead:
[optional footer(s)]
```
~~`fix: typo`~~ -> `docs: fix typo`
#### Types
- `feat` : for new features.
- `fix` : for bug fixes.
- `refactor` : for code changes that are neither bug fixes nor new features.
- `perf` : for code refactoring that improves performance.
- `test` : for code related to automatic testing.
- `style` : for refactoring related to code style (not for CSS).
- `docs` : for changes related to documentation.
- `chore` : for anything else.
#### Scope
Where the change occurred (e.g., `Table`, `Alert`, `Accordion`, etc.).
#### Description
A summary of the changes made.
#### Examples
- If you are working on a specific component, ensure that you specify the main scope of your commit in brackets. e.g.
```
feat(Alert): new component
chore(Table): improve accessibility
docs: migrate to @nuxt/ui-pro
```
### 4. Making the Pull Request
### 4. Making a Pull Request
- Follow the guide for creating a pull request and ensure your PR's title adheres to the Commit Convention. Mention any related issues in the PR description.
- Follow along the [instructions](https://github.com/nuxt/ui/blob/main/.github/PULL_REQUEST_TEMPLATE.md?plain=1) provided when creating a PR
- Ensure your PR's title adheres to the [Conventional Commits](https://www.conventionalcommits.org/) since it will be used once the code is merged.
- Multiple commits are fine; no need to rebase or force push. We'll use `Squash and Merge` when merging.