Skip to content

Latest commit

 

History

History
52 lines (38 loc) · 4.19 KB

CONTRIBUTING.md

File metadata and controls

52 lines (38 loc) · 4.19 KB

Contributing to http-server

Please read these guidelines before submitting an issue, filing a feature request, or contributing code.

🐛 I Found a Bug

Sorry! It happens to the best of us. If you've found a bug in http-server, please search to see if it's already been reported. Otherwise, create a new issue. If you can fix the bug yourself, feel free to create a pull request thereafter.

Please include as much detail as possible to help us reproduce and diagnose the bug. Most importantly:

  • Make use of the issue template!
  • Let us know how you're running http-server (options, flags, environment, etc.)
  • Include your test code or file(s). If large, please provide a link to a repository or gist.
  • Please show code in JavaScript only (any version)

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.

❗ Propose a Change

Before you get your hands dirty, please search for a related issue, or create a new one. 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.

👞 Contributing Code: Step-by-Step

Follow these steps to get going.

  1. Install the latest version of Node.js.
    • If you're new to installing Node, a tool like nvm can help you manage multiple version installations.
  2. Follow Github's documentation on setting up Git, forking and cloning.
  3. Create a new branch in your fork, giving it a descriptive name
  4. Execute npm install to install the prod and dev dependencies
    • Do not use yarn install for development, as it may not get the same package versions as other developers.
  5. Make your changes and add them via git add.
    • 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
    • Keep your PR focused. Don't fix multiple things at once, and don't upgrade dependencies unless necessary.
  6. Before committing, run npm test
    • Tests will also run on your PR, but running them locally will let you catch problems ahead-of-time.
  7. Commit your changes.
  8. Push your changes to your fork.
  9. Now on 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.
  10. Describe your changes in detail here, following the template. Once you're satisfied, submit the form.
  11. Be patient while your PR is reviewed. This can take a while. We may request changes, but don't be afraid to question them.
  12. Your PR might become conflicted with the code in master. If this is the case, you will need to update your PR and resolve your conflicts.
  13. 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.
    • Please do not rebase and force-push, it ruins the git history

👼 I Just Want To Help

Excellent. Here's how:

  • Handy with JavaScript? Please check out the issues labeled help-wanted or good first issue.
  • Wait--you write unit tests for fun? A PR which increases coverage is unlikely to ever be turned down.