Glad to hear you'd like to help us improving the library. Here's the how-to!
Sounds nice! Please proceed as following:
- Search for existing issues. Sometimes, other folks may have reported the same issue and it'd be nice not to duplicate them.
- If possible, please create an isolated and reproducible test case. Make use of jsFiddle - for instance - to share your isolated test cases. We won't hold it against you for feature requests, but a live POC is sometimes easier to catch.
- Share as much information as possible. Include browser and version, version of gitgraph.js, etc. where appropriate. That can help us to reproduce the bug, if so.
Github's Pull Request is a fantastic tool to contribute to the code.
Just keep in mind the following rules:
- Change must be done in
src/
files, eventuallytest/
orexamples/
, that's all. - You'd be nice not to pollute your pull request with unintended changes.
- Pull requests should always be against the
develop
branch, never againstmaster
norgh-pages
.
Once you send a Pull Request, your code will be check with Travis CI to tell whether you break the build or not. The Travis test should pass before we accept any Pull Request.
Please follow our coding standards as best as you can to keep consistency over code.
The .editorconfig file should help you configure your IDE to do so.
- 2 spaces indent (no tabs)
- Use semicolons
- Use strict mode
- Strings must use double-quote
- Adhere to the (default) CSScomb property order
- Multiple-line approach (one property and value per line)
- Always a space after a property's colon (.e.g,
display: block;
and notdisplay:block;
) - End all lines with a semi-colon
- For multiple, comma-separated selectors, place each selector on its own line
- Attribute selectors, like
input[type="text"]
, should always wrap the attribute's value in double quotes, for consistency and safety (see this blog post on unquoted attribute values that can lead to XSS attacks).
- Two spaces for indentation, never tabs
- Double quotes only, never single quotes
- Always use proper indentation
- Use tags and elements valid for an HTML5 doctype
By contributing your code, you agree to license your contribution under the terms of the MIT license.