Nuxt/docs/content/99.community/3.contribution.md
2021-06-25 11:36:38 +02:00

3.8 KiB

Contribution

Nuxt is a community project - and so we love contributions of all kinds! ❤️

There are a range of different ways you might be able to contribute to the Nuxt ecosystem.

Create a module

If you've built something with Nuxt that's cool, why not extract it into a module, so it can be shared with others? We have many awesome modules already but there's always room for more.

If you need help while building it, feel free to check in with us.

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 and 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.

Setup your dev environment

  1. Fork the Nuxt3 repository to your own GitHub account and then clone 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.

  1. Check out a branch where you can work and commit your changes:
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 code 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.

Particularly, make sure your PR title adheres to Conventional Commits guidelines, and do link the related issue (feature request or bug report) in the issue description.