chore(docs): update contribution guidelines · mgonto/restangular@c49ca45
1-#Issues
1+# Issues
223-## Opening an Issue
3+Read the [issue guidlines](.github/ISSUE_TEMPLATE.md) before opening an issue!
445-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:
5+# How to submit PRs
667-- 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.
8-- 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)
7+## Install env
9810-# PRs
11-12-##Install env
13-14-In order to contribute just git clone the repository and then run:
9+In order to contribute just create your own [fork](https://help.github.com/articles/fork-a-repo/)
10+of the repository and then run:
15111612```
17-git clone git@github.com:mgonto/restangular.git
13+git clone git@github.com:<your_username>/restangular.git
1814cd restangular
1915npm install grunt-cli --global
2016npm install
2117```
221823-Be sure to have PhantomJS installed as Karma tests use it. Otherwise, in Mac just run
19+## Create a branch
242025-```
26-brew install phantomjs
27-```
21+Create a branch for your code changes
282229-All changes must be done in src/restangular.js
23+`git checkout -b my_awesome_fix`
302431-##Branching
25+## Write tests
322633-Please submit a Pull Request or create issues for anything you want :). If your code is super small, nobody will blame
34-you for doing it from master to master. Otherwise, please try to create a branch `features/[name of your awesome feature]`.
27+When making changes to the code, please always **write a test case** for
28+your topic before making the change. Watch the test fail, then
29+implement the change and watch the test succeed.
353036-##Testing and styling
31+Tests are run with `grunt test`.
373238-Before submitting any PR, you should run `grunt test` to validate your didn't break anything. If you just added a new
39-feature, please also add tests for it. And when you're done with your code, run `grunt jshint` to check
33+## Keep the style
34+35+When you're done with your code, run `grunt jshint` to check
4036if you code follow the same simple coding design as the rest of the project.
37+Consider integrating `jshint` in your editor to get real time feedback on your
38+style as you're coding.
39+40+## Commit message format
41+42+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
43+us to keep a decent [CHANGELOG](CHANGELOG.md) with minimum effort. Check previous commit
44+messages for examples.
45+46+## Update docs
47+48+If your code change includes new features, please include an update to the [README.md](README.md)
49+explaining your feature.
50+51+**Don't**, however, generate distribution files (the files in [dist](dist)). This will be done
52+on a regular basis by maintainers as PRs are merged.
53+54+## Squash commits
55+56+Please consider squasing the commits in your topic branch into a single commit including
57+all changes needed. This will make the PR cleaner and the change history more easy to follow
58+after the PR has been merged. Also, the CHANGELOG will make more sense.
59+60+Look [here](https://ariejan.net/2011/07/05/git-squash-your-latests-commits-into-one/) and
61+[here](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Squashing-Commits) for how to.
62+63+## Sumbit the PR
64+65+Now you're ready to [open a PR](https://help.github.com/articles/creating-a-pull-request-from-a-fork/).
41664267Thanks!