-
Notifications
You must be signed in to change notification settings - Fork 840
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(docs): update contribution guidelines
- Loading branch information
Showing
1 changed file
with
47 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,67 @@ | ||
#Issues | ||
# Issues | ||
|
||
## Opening an Issue | ||
Read the [issue guidlines](.github/ISSUE_TEMPLATE.md) before opening an issue! | ||
|
||
To open an issue, please keep in mind a few important things. First, take a look at the README docs and make sure that your question isn't already answered in the documentation. In particular, review [the configuration methods](https://github.com/mgonto/restangular#configuring-restangular) and [methods description](https://github.com/mgonto/restangular#methods-description). Then make sure you search the issues list to see if there's already an issue open that solves your problem. Then, once you've determined that your issue isn't a duplicate, here a couple guidelines to opening an issue that will be addressed easily and quickly: | ||
# How to submit PRs | ||
|
||
- Please make sure your issue is written in a clear and succint manner, so that all the details of your issue are easy to understand and fully explained. Also, please make sure enclose your code in [fenced blocks](https://help.github.com/articles/creating-and-highlighting-code-blocks/) for readability. | ||
- Make sure your issue includes a live Plunker (fork [this Plunker](http://plnkr.co/edit/26Heuv5F6hUgxpNWNTee?p=info)), and all relevant code samples (as well as information about server responses, if relevant) | ||
## Install env | ||
|
||
# PRs | ||
|
||
##Install env | ||
|
||
In order to contribute just git clone the repository and then run: | ||
In order to contribute just create your own [fork](https://help.github.com/articles/fork-a-repo/) | ||
of the repository and then run: | ||
|
||
``` | ||
git clone [email protected]:mgonto/restangular.git | ||
git clone [email protected]:<your_username>/restangular.git | ||
cd restangular | ||
npm install grunt-cli --global | ||
npm install | ||
``` | ||
|
||
Be sure to have PhantomJS installed as Karma tests use it. Otherwise, in Mac just run | ||
## Create a branch | ||
|
||
``` | ||
brew install phantomjs | ||
``` | ||
Create a branch for your code changes | ||
|
||
All changes must be done in src/restangular.js | ||
`git checkout -b my_awesome_fix` | ||
|
||
##Branching | ||
## Write tests | ||
|
||
Please submit a Pull Request or create issues for anything you want :). If your code is super small, nobody will blame | ||
you for doing it from master to master. Otherwise, please try to create a branch `features/[name of your awesome feature]`. | ||
When making changes to the code, please always **write a test case** for | ||
your topic before making the change. Watch the test fail, then | ||
implement the change and watch the test succeed. | ||
|
||
##Testing and styling | ||
Tests are run with `grunt test`. | ||
|
||
Before submitting any PR, you should run `grunt test` to validate your didn't break anything. If you just added a new | ||
feature, please also add tests for it. And when you're done with your code, run `grunt jshint` to check | ||
## Keep the style | ||
|
||
When you're done with your code, run `grunt jshint` to check | ||
if you code follow the same simple coding design as the rest of the project. | ||
Consider integrating `jshint` in your editor to get real time feedback on your | ||
style as you're coding. | ||
|
||
## Commit message format | ||
|
||
Please write your commit messages in the [angular conventional changelog](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md) format. This will help | ||
us to keep a decent [CHANGELOG](CHANGELOG.md) with minimum effort. Check previous commit | ||
messages for examples. | ||
|
||
## Update docs | ||
|
||
If your code change includes new features, please include an update to the [README.md](README.md) | ||
explaining your feature. | ||
|
||
**Don't**, however, generate distribution files (the files in [dist](dist)). This will be done | ||
on a regular basis by maintainers as PRs are merged. | ||
|
||
## Squash commits | ||
|
||
Please consider squasing the commits in your topic branch into a single commit including | ||
all changes needed. This will make the PR cleaner and the change history more easy to follow | ||
after the PR has been merged. Also, the CHANGELOG will make more sense. | ||
|
||
Look [here](https://ariejan.net/2011/07/05/git-squash-your-latests-commits-into-one/) and | ||
[here](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Squashing-Commits) for how to. | ||
|
||
## Sumbit the PR | ||
|
||
Now you're ready to [open a PR](https://help.github.com/articles/creating-a-pull-request-from-a-fork/). | ||
|
||
Thanks! |