mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-16 19:04:48 +00:00
1a7b570c82
Co-authored-by: Pooya Parsa <pyapar@gmail.com>
68 lines
3.8 KiB
Markdown
68 lines
3.8 KiB
Markdown
# Contribution
|
|
|
|
Nuxt is a community project - and so we love contributions of all kinds! ❤️
|
|
|
|
There is a range of different ways you might be able to contribute to the Nuxt ecosystem.
|
|
|
|
## Improve our documentation
|
|
|
|
Documentation is one of the most important parts of Nuxt. We aim to be an intuitive framework - and a big part of that is making sure that both the developer experience and the docs are perfect. 👌
|
|
|
|
If you spot an area where we can improve documentation or error messages, please do open a PR - even if it's just to fix a typo!
|
|
|
|
## Triage issues and help out in discussions
|
|
|
|
Check out [our issues board](https://github.com/nuxt/framework/issues) and [discussions](https://github.com/nuxt/framework/discussions). Helping other users, sharing workarounds, creating reproductions or even just poking into a bug a little bit and sharing your findings - it all makes a huge difference.
|
|
|
|
## Fixing a bug or adding a feature
|
|
|
|
Before you fix a bug or add a feature, ensure there's an issue that describes it. Particularly for new features, this is a great opportunity for the project leads to give feedback before starting work on it.
|
|
|
|
### Set up your dev environment
|
|
|
|
1. [Fork](https://help.github.com/articles/fork-a-repo/) the [Nuxt 3 repository](https://github.com/nuxt/framework) to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device.
|
|
|
|
2. Run `yarn` to install the dependencies.
|
|
|
|
> If you are adding a dependency, please use `yarn add`. The `yarn.lock` file is the source of truth for all Nuxt dependencies.
|
|
|
|
3. Run `yarn stub` to activate passive development
|
|
|
|
4. Check out a branch where you can work and commit your changes:
|
|
|
|
```bash
|
|
git checkout -b my-new-branch
|
|
```
|
|
|
|
### Examples
|
|
|
|
While working on your PR you will likely want to check if your changes are working correctly.
|
|
|
|
To do so you can modify the example app in `playground/`, and run it with `yarn play`. Make sure not to commit it to your branch, but it could be helpful to add some example code to your PR description. This can help reviewers and other Nuxt users understand the feature you've built in-depth.
|
|
|
|
### Testing
|
|
|
|
Every new feature should have a corresponding unit test (if possible). The `test` folder in this repository is currently a work in progress, but do your best to create a new test following the example of what's already there.
|
|
|
|
Before creating a PR or marking it as ready-to-review, make sure that all tests are passing by running `yarn test` locally.
|
|
|
|
### Linting
|
|
|
|
As you might have noticed already, we use ESLint to enforce a coding standard. Please run `yarn lint` before committing your changes to verify that the code style is correct. If not, you can use `yarn lint --fix` to fix most of the style changes. If there are still errors left, you must correct them manually.
|
|
|
|
### Documentation
|
|
|
|
If you are adding a new feature, or refactoring or changing the behavior of Nuxt in any other manner, you'll likely want to document the changes. Please include any changes to the docs in the same PR. You don't have to write documentation up on the first commit (but please do so as soon as your pull request is mature enough).
|
|
|
|
### Final checklist
|
|
|
|
When submitting your PR, there is a simple template that you have to fill out. Please tick all appropriate "answers" in the checklists.
|
|
|
|
<!-- ## Create a module
|
|
|
|
If you've built something with Nuxt that's cool, why not [extract it into a module](/modules/kit), so it can be shared with others? We have [many awesome modules already](https://modules.nuxtjs.org/) but there's always room for more.
|
|
|
|
If you need help while building it, feel free to [check in with us](/community/getting-help). -->
|
|
|
|
Particularly, make sure your PR title adheres to [Conventional Commits guidelines](https://www.conventionalcommits.org/en/v1.0.0/), and do link the related issue (feature request or bug report) in the issue description.
|