|
| 1 | +# Contributing to AngularFire2 |
| 2 | + |
| 3 | +We would love for you to contribute to AngularFire2 and help make it even better than it is |
| 4 | +today! As a contributor, here are the guidelines we would like you to follow: |
| 5 | + |
| 6 | + - [Code of Conduct](#coc) |
| 7 | + - [Question or Problem?](#question) |
| 8 | + - [Issues and Bugs](#issue) |
| 9 | + - [Feature Requests](#feature) |
| 10 | + - [Initial Setup](#setup) |
| 11 | + - [Submission Guidelines](#submit) |
| 12 | + - [Coding Rules][rules] (external link) |
| 13 | + - [Commit Message Guidelines][commit] (external link) |
| 14 | + - [Signing the CLA](#cla) |
| 15 | + |
| 16 | +## <a name="coc"></a> Code of Conduct |
| 17 | + |
| 18 | +Help us keep the Angular and Firebase communities open and inclusive. Please read and follow the Angular [Code of Conduct][coc]. |
| 19 | + |
| 20 | +## <a name="question"></a> Got a Question or Problem? |
| 21 | + |
| 22 | +If you have questions about how to *use* AngularFire, please direct them to the [Angular Google Group][angular-group] |
| 23 | +discussion list or [StackOverflow][stackoverflow] (include the `firebase` and `angular` tags!). |
| 24 | +Please note that the Angular team's capacity to answer usage questions is limited. |
| 25 | +Members of the Firebase team can be reached on [Slack][slack] and via the [Firebase Google Group][firebase-group]. |
| 26 | + |
| 27 | +## <a name="issue"></a> Found an Issue? |
| 28 | + |
| 29 | +If you find a bug in the source code, you can help us by |
| 30 | +[submitting an issue](#submit-issue) to our [GitHub Repository][github]. Even better, you can |
| 31 | +[submit a Pull Request](#submit-pr) with a fix. |
| 32 | + |
| 33 | +## <a name="feature"></a> Want a Feature? |
| 34 | + |
| 35 | +You can *request* a new feature by [submitting an issue](#submit-issue) to our [GitHub |
| 36 | +Repository][github]. If you would like to *implement* a new feature, please submit an issue with |
| 37 | +a proposal for your work first, to be sure that we can use it. |
| 38 | +Please consider what kind of change it is: |
| 39 | + |
| 40 | +* For a **Major Feature**, first open an issue and outline your proposal so that it can be |
| 41 | +discussed. This will also allow us to better coordinate our efforts, prevent duplication of work, |
| 42 | +and help you to craft the change so that it is successfully accepted into the project. |
| 43 | +* **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr). |
| 44 | + |
| 45 | +## <a name="setup"></a> Initial Setup |
| 46 | + |
| 47 | +1) Create a fork of AngularFire2 (See [Forking a Project][github-fork]) |
| 48 | + |
| 49 | +2) CD into your clone and install dependencies |
| 50 | + |
| 51 | +```shell |
| 52 | +$ git clone |
| 53 | +$ npm install |
| 54 | +$ npm run build |
| 55 | +$ npm test |
| 56 | +``` |
| 57 | + |
| 58 | +3) Make your changes in a new git branch: |
| 59 | + |
| 60 | +```shell |
| 61 | +git checkout -b my-fix-branch master |
| 62 | +``` |
| 63 | + |
| 64 | +## <a name="submit"></a> Submission Guidelines |
| 65 | + |
| 66 | +### <a name="submit-issue"></a> Submitting an Issue |
| 67 | +Help us to maximize the effort we can spend improving the product by not reporting duplicate issues. |
| 68 | +Search the archives before you submit. |
| 69 | + |
| 70 | +Providing the following information will increase the chances of your issue being dealt with quickly: |
| 71 | + |
| 72 | +* **Overview of the Issue** - if an error is being thrown a non-minified stack trace helps |
| 73 | +* **Angular Version** - what version of Angular, Firebase, and AngularFire are you using? |
| 74 | +* **Motivation for or Use Case** - explain what are you trying to do and why the current behavior is a bug for you |
| 75 | +* **Browsers and Operating System** - is this a problem with all browsers? |
| 76 | +* **Reproduce the Error** - provide a live example (using [Plunker][plunker], |
| 77 | + [JSFiddle][jsfiddle] or [Runnable][runnable]) or a unambiguous set of steps |
| 78 | +* **Related Issues** - has a similar issue been reported before? |
| 79 | +* **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be |
| 80 | + causing the problem (line of code or commit) |
| 81 | + |
| 82 | +You can file new issues by providing the above information [here](https://github.com/angular/angularfire2/issues/new). |
| 83 | + |
| 84 | +### <a name="submit-pr"></a> Submitting a Pull Request (PR) |
| 85 | + |
| 86 | +#### Before you submit: |
| 87 | + |
| 88 | +* Ensure proposed changes or problem have already been clearly defined and |
| 89 | + discussed in the issue tracker. We don't want you to burn time on code |
| 90 | + that isn't a good fit for the project. |
| 91 | +* Search [GitHub](https://github.com/angular/angularfire2/pulls) for an open or closed PR |
| 92 | + that relates to your submission. You don't want to duplicate effort. |
| 93 | +* Please sign our [Contributor License Agreement (CLA)](#cla) before sending PRs. |
| 94 | + We cannot accept code without this. |
| 95 | + |
| 96 | +#### How to submit: |
| 97 | + |
| 98 | +* Create your patch, **including appropriate test cases**. |
| 99 | +* Follow the [Angular Coding Rules][rules]. |
| 100 | +* Run the full test suite, as described in the [developer documentation][dev-doc], |
| 101 | + and ensure that all tests pass. |
| 102 | +* Commit your changes using a descriptive commit message that follows the |
| 103 | + [Angular commit message conventions][commit]. Adherence to these conventions |
| 104 | + is necessary because release notes are automatically generated from these messages. |
| 105 | + |
| 106 | + ```shell |
| 107 | + git commit -a |
| 108 | + ``` |
| 109 | + Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files. |
| 110 | + |
| 111 | +* Push your branch to GitHub: |
| 112 | + |
| 113 | + ```shell |
| 114 | + git push origin my-fix-branch |
| 115 | + ``` |
| 116 | + |
| 117 | +* In GitHub, send a pull request to `angular:master`. |
| 118 | +* If we suggest changes then: |
| 119 | + * Make the required updates. |
| 120 | + * Re-run the test suites to ensure tests are still passing. |
| 121 | + * Rebase your branch and force push to your GitHub repository (this will update your Pull Request): |
| 122 | + |
| 123 | + ```shell |
| 124 | + git rebase master -i |
| 125 | + git push -f |
| 126 | + ``` |
| 127 | + |
| 128 | +That's it! Thank you for your contribution! |
| 129 | +
|
| 130 | +#### Deploying Docs |
| 131 | +
|
| 132 | +1) Build the docs |
| 133 | +
|
| 134 | +`$ npm run docs` |
| 135 | +
|
| 136 | +2) Deploy Docs to Firebase Hosting |
| 137 | +
|
| 138 | +(Ask @jeffbcross to add you as a collaborator or deploy on your behalf) |
| 139 | +
|
| 140 | +``` |
| 141 | +$ npm install -g firebase-tools |
| 142 | +$ firebase login |
| 143 | +$ npm run docs |
| 144 | +$ cd docs |
| 145 | +$ firebase deploy |
| 146 | +``` |
| 147 | +
|
| 148 | +## <a name="cla"></a> Signing the CLA |
| 149 | +
|
| 150 | +Please sign our Contributor License Agreement (CLA) before sending pull requests. For any code |
| 151 | +changes to be accepted, the CLA must be signed. It's a quick process, we promise! |
| 152 | + |
| 153 | +* For individuals we have a [simple click-through form][individual-cla]. |
| 154 | +* For corporations we'll need you to |
| 155 | + [print, sign and one of scan+email, fax or mail the form][corporate-cla]. |
| 156 | +
|
| 157 | +
|
| 158 | +[slack]: https://firebase-community.appspot.com/ |
| 159 | +[coc]: https://github.com/angular/code-of-conduct/blob/master/CODE_OF_CONDUCT.md |
| 160 | +[commit-message-format]: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit# |
| 161 | +[corporate-cla]: http://code.google.com/legal/corporate-cla-v1.0.html |
| 162 | +[individual-cla]: http://code.google.com/legal/individual-cla-v1.0.html |
| 163 | +[js-style-guide]: https://google.github.io/styleguide/javascriptguide.xml |
| 164 | +[jsfiddle]: http://jsfiddle.net |
| 165 | +[plunker]: http://plnkr.co/edit |
| 166 | +[runnable]: http://runnable.com |
| 167 | +[github]: https://github.com/angular/angularfire2 |
| 168 | +[stackoverflow]: http://stackoverflow.com/questions/tagged/angularfire |
| 169 | +[rules]: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#rules |
| 170 | +[commit]: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-commit-message-guidelines |
| 171 | +[angular-group]: https://groups.google.com/forum/#!forum/angular |
| 172 | +[firebase-group]: https://groups.google.com/forum/#!forum/firebase-talk |
| 173 | +[github-fork]: https://help.github.com/articles/fork-a-repo/ |
0 commit comments