Skip to content

Commit 111bfd7

Browse files
authored
Merge pull request http-party#752 from http-party/contribution-guide
Add Contributing guide
2 parents c28e2c9 + 49e6608 commit 111bfd7

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

.github/CONTRIBUTING.md

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Contributing to http-server
2+
3+
> Please read these guidelines before submitting an issue, filing a feature request, or contributing code.
4+
5+
## :bug: I Found a Bug
6+
7+
Sorry! It happens to the best of us. If you've found a bug in http-server, **please [search](https://github.com/http-party/http-server/issues/) to see if it's already been reported**. Otherwise, create a [new issue](https://github.com/http-party/http-server/issues/new). If you can fix the bug yourself, feel free to create a [pull request](#propose-a-change) thereafter.
8+
9+
Please include _as much detail as possible_ to help us reproduce and diagnose the bug. Most importantly:
10+
11+
- Make use of the issue template!
12+
- Let us know _how_ you're running http-server (options, flags, environment, etc.)
13+
- Include your test code or file(s). If large, please provide a link to a repository or [gist](https://gist.github.com).
14+
- Please show code in JavaScript only (any version)
15+
16+
If we need more information from you, we'll let you know. If you don't within a reasonable time frame (TBD), your issue will be automatically tagged as stale and eventually closed for inactivity.
17+
18+
## :exclamation: Propose a Change
19+
20+
Before you get your hands dirty, please [search](https://github.com/http-party/http-server/issues/) for a related issue, or [create a new one](https://github.com/http-party/http-server/issues/new). If you wish to contribute a new feature, this is doubly important! Let's discuss your proposed changes first; we don't want you to waste time implementing a change that is at odds with the project's direction. That said, we'll happily consider any contribution, no matter how great or small.
21+
22+
### :shoe: Contributing Code: Step-by-Step
23+
24+
Follow these steps to get going.
25+
26+
1. [Install the latest version of Node.js](https://nodejs.org/en/download).
27+
- If you're new to installing Node, a tool like [nvm](https://github.com/creationix/nvm#install-script) can help you manage multiple version installations.
28+
1. Follow [Github's documentation](https://help.github.com/articles/fork-a-repo/) on setting up Git, forking and cloning.
29+
1. Create a new branch in your fork, giving it a descriptive name
30+
1. Execute `npm install` to install the prod and dev dependencies
31+
- Do not use `yarn install` for development, as it may not get the same package versions as other developers.
32+
1. Make your changes and add them via `git add`.
33+
- **Tests are required** for any non-trivial code change. If you're having trouble making tests, go ahead and open the pull request and we can help
34+
- Keep your PR focused. Don't fix multiple things at once, and don't upgrade dependencies unless necessary.
35+
1. Before committing, run `npm test`
36+
- Tests will also run on your PR, but running them locally will let you catch problems ahead-of-time.
37+
1. Commit your changes.
38+
- See [How to Write a Git Commit Message](https://chris.beams.io/posts/git-commit/).
39+
1. Push your changes to your fork.
40+
1. Now on [http-party/http-server](https://github.com/http-party/http-server), you should see a notification about your recent changes in your fork's branch, with a green button to create a pull request. Click the button.
41+
1. Describe your changes in detail here, following the template. Once you're satisfied, submit the form.
42+
1. Be patient while your PR is reviewed. This can take a while. We may request changes, but don't be afraid to question them.
43+
1. Your PR might become conflicted with the code in `master`. If this is the case, you will need to [update your PR](#up-to-date) and resolve your conflicts.
44+
1. You don't need to make a new PR to any needed changes. Instead, commit on top of your changes, and push these to your fork's branch. The PR will be updated, and CI will re-run.
45+
- **Please do not rebase and force-push**, it ruins the git history
46+
47+
## :angel: I Just Want To Help
48+
49+
_Excellent._ Here's how:
50+
51+
- **Handy with JavaScript?** Please check out the issues labeled [`help-wanted`](https://github.com/http-party/http-server/issues?q=is%3Aopen+is%3Aissue+label%3A%22help-wanted%22) or [`good first issue`](https://github.com/http-party/http-server/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Agood+first+issue).
52+
- **Wait--you write unit tests for _fun_?** A PR which increases coverage is unlikely to ever be turned down.

0 commit comments

Comments
 (0)