Skip to content

Commit 8ab5195

Browse files
committed
Add adapted contributing guide from svelte
1 parent d497476 commit 8ab5195

File tree

1 file changed

+106
-0
lines changed

1 file changed

+106
-0
lines changed

CONTRIBUTING.md

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# Contributing to vite-plugin-svelte
2+
3+
Svelte is a new way to build web applications. It's a compiler that takes your declarative components and converts them into efficient JavaScript that surgically updates the DOM.
4+
5+
The [Open Source Guides](https://opensource.guide/) website has a collection of resources for individuals, communities, and companies. These resources help people who want to learn how to run and contribute to open source projects. Contributors and people new to open source alike will find the following guides especially useful:
6+
7+
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
8+
- [Building Welcoming Communities](https://opensource.guide/building-community/)
9+
10+
## Get involved
11+
12+
There are many ways to contribute to Svelte, and many of them do not involve writing any code. Here's a few ideas to get started:
13+
14+
- Simply start using vite-plugin-svelte. Does everything work as expected? If not, we're always looking for improvements. Let us know by [opening an issue](#reporting-new-issues).
15+
- Look through the [open issues](https://github.com/sveltejs/vite-plugin-svelte/issues). Provide workarounds, ask for clarification, or suggest labels. Help [triage issues](#triaging-issues-and-pull-requests).
16+
- If you find an issue you would like to fix, [open a pull request](#your-first-pull-request).
17+
- Read through our [documentation](https://github.com/sveltejs/vite-plugin-svelte/tree/main/docs). If you find anything that is confusing or can be improved, open a pull request.
18+
- Take a look at the [features requested](https://github.com/sveltejs/vite-plugin-svelte/labels/enhancement) by others in the community and consider opening a pull request if you see something you want to work on.
19+
20+
Contributions are very welcome. If you think you need help planning your contribution, please ping us on Discord at [svelte.dev/chat](https://svelte.dev/chat) and let us know you are looking for a bit of help.
21+
22+
### Triaging issues and pull requests
23+
24+
One great way you can contribute to the project without writing any code is to help triage issues and pull requests as they come in.
25+
26+
- Ask for more information if you believe the issue does not provide all the details required to solve it.
27+
- Suggest [labels](https://github.com/sveltejs/vite-plugin-svelte/labels) that can help categorize issues.
28+
- Flag issues that are stale or that should be closed.
29+
- Ask for test plans and review code.
30+
31+
## Bugs
32+
33+
We use [GitHub issues](https://github.com/sveltejs/vite-plugin-svelte/issues) for our public bugs. If you would like to report a problem, take a look around and see if someone already opened an issue about it. If you are certain this is a new unreported bug, you can submit a [bug report](#reporting-new-issues).
34+
35+
If you have questions about using Svelte, contact us on Discord at [svelte.dev/chat](https://svelte.dev/chat), and we will do our best to answer your questions.
36+
37+
If you see anything you'd like to be implemented, create a [feature request issue](https://github.com/sveltejs/vite-plugin-svelte/issues/new?template=feature_request.md)
38+
39+
## Reporting new issues
40+
41+
When [opening a new issue](https://github.com/sveltejs/svelte/issues/new/new?template=bug_report.md), always make sure to fill out the issue template. **This step is very important!** Not doing so may result in your issue not being managed in a timely fashion. Don't take this personally if this happens, and feel free to open a new issue once you've gathered all the information required by the template.
42+
43+
- **One issue, one bug:** Please report a single bug per issue.
44+
- **Provide reproduction steps:** List all the steps necessary to reproduce the issue. The person reading your bug report should be able to follow these steps to reproduce your issue with minimal effort.
45+
46+
## Installation
47+
48+
1. This monorepo uses [pnpm](https://pnpm.js.org/en/). Install it with `npm i -g pnpm`
49+
1. After cloning the repo run `pnpm install` to install dependencies
50+
1. run `pnpm dev` to build vite-plugin-svelte in watch mode
51+
1. run `pnpm dev` in `packages/playground/xxx` to start vite
52+
53+
## Pull requests
54+
55+
### Your first pull request
56+
57+
So you have decided to contribute code back to upstream by opening a pull request. You've invested a good chunk of time, and we appreciate it. We will do our best to work with you and get the PR looked at.
58+
59+
Working on your first Pull Request? You can learn how from this free video series:
60+
61+
[**How to Contribute to an Open Source Project on GitHub**](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github)
62+
63+
### Proposing a change
64+
65+
If you would like to request a new feature or enhancement but are not yet thinking about opening a pull request, you can also file an issue with [feature template](https://github.com/sveltejs/vite-plugin-svelte/issues/new?template=feature_request.md).
66+
67+
If you're only fixing a bug, it's fine to submit a pull request right away but we still recommend that you file an issue detailing what you're fixing. This is helpful in case we don't accept that specific fix but want to keep track of the issue.
68+
69+
### Sending a pull request
70+
71+
Small pull requests are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.
72+
73+
Please make sure the following is done when submitting a pull request:
74+
75+
1. Fork [the repository](https://github.com/sveltejs/vite-plugin-svelte) and create your branch from `main`.
76+
1. Describe your **test plan** in your pull request description. Make sure to test your changes.
77+
1. Make sure your code lints (`pnpm run lint`).
78+
1. Make sure your tests pass (`pnpm run test`).
79+
80+
All pull requests should be opened against the `main` branch.
81+
82+
#### Tests
83+
84+
Integration tests for new features or regression tests as part of a bug fix are very welcome.
85+
Add them to projects in `packages/playground`.
86+
87+
#### Documentation
88+
89+
If you've changed APIs, update the documentation.
90+
91+
#### Changelogs
92+
93+
For changes to be reflected in package changelogs, run `pnpx changeset` and follow the prompts.
94+
You should always select the packages you've changed, Most likely `@sveltejs/vite-plugin-svelte`.
95+
96+
### What happens next?
97+
98+
The core Svelte team will be monitoring for pull requests. Do help us by making your pull request easy to review by following the guidelines above.
99+
100+
## Style guide
101+
102+
[Eslint](https://eslint.org) will catch most styling issues that may exist in your code. You can check the status of your code styling by simply running `pnpm run lint`.
103+
104+
## License
105+
106+
By contributing to vite-plugin-svelte, you agree that your contributions will be licensed under its [MIT license](https://github.com/sveltejs/vite-plugin-svelte/blob/main/LICENSE).

0 commit comments

Comments
 (0)