Thanks for helping to improve this project! It’s great to have you here.
Here are a few things to know as you contribute.
The best place to ask your question is in a new issue. You can open one here!
You can also report bugs or ask for features by opening an issue. Before you do, though, please search the archive to make sure your issue hasn’t already been reported.
When you submit an issue, help provide the following to help me address it:
- Steps to reproduce the error.
- A stack trace for the error being thrown, if any.
- The version of node and of the json-api library that you’re using.
- Suggestions for a fix. If you can’t fix the bug yourself, perhaps you can point to what might be causing the problem (i.e. the line of code or commit).
- Explain the need you have for the feature and why it can’t be handled with the existing functionality.
-
Forking and Submitting PRs. After you fork the repository, please make your changes in a new branch and then submit a pull request. This is standard procedure and can all be done through the GitHub website.
-
Compiling. This library is written in TypeScript, so it needs to be "compiled" to JavaScript to run on Node. This can be done with the
npm run build
command. Note that this isn't needed if you just want to run the tests. -
Running tests. Just run
npm test
. Thets-node
tool will handle compilation from TypeScript to JavaScript on the fly. -
Code style. Once you’ve written your code, make sure that it complies with this repository’s style guidelines by running
npm run lint
from the project’s root directory and fixing any errors that show up. -
Before you submit. Before submitting your PR, make sure that all the tests still pass and that you've added tests (in the
/test
directory) to cover your new code. To keep this library reliable, I generally don't accept pull requests with missing or broken tests.
This library is currently documented primarily in the Readme. The example API project can also serve as a useful reference, as can the comments in the code, which are generally thorough.
Help with documentation—or anything else that makes this project easier to use—is always appreciated! Feel free to discuss/submit improvements in an issue or pull request.