|
| 1 | +# Contributing | Firebase Queue |
| 2 | + |
| 3 | +Thank you for contributing to the Firebase community! |
| 4 | + |
| 5 | + - [Have a usage question?](#question) |
| 6 | + - [Think you found a bug?](#issue) |
| 7 | + - [Have a feature request?](#feature) |
| 8 | + - [Want to submit a pull request?](#submit) |
| 9 | + - [Need to get set up locally?](#local-setup) |
| 10 | + |
| 11 | + |
| 12 | +## <a name="question"></a>Have a usage question? |
| 13 | + |
| 14 | +We get lots of those and we love helping you, but GitHub is not the best place for them. Issues |
| 15 | +which just ask about usage will be closed. |
| 16 | + |
| 17 | +Start with the [guide](../docs/guide.md). If the official documentation doesn't help, try asking a |
| 18 | +question through our [official support channels](https://firebase.google.com/support/). |
| 19 | + |
| 20 | +**Please avoid double posting across multiple channels!** |
| 21 | + |
| 22 | + |
| 23 | +## <a name="issue"></a>Think you found a bug? |
| 24 | + |
| 25 | +Yeah, we're definitely not perfect! |
| 26 | + |
| 27 | +Search through [old issues](https://github.com/firebase/firebase-queue/issues) before submitting a new |
| 28 | +issue as your question may have already been answered. |
| 29 | + |
| 30 | +If your issue appears to be a bug, and hasn't been reported, |
| 31 | +[open a new issue](https://github.com/firebase/firebase-queue/issues/new). Please use the provided bug |
| 32 | +report template and include a minimal repro. |
| 33 | + |
| 34 | +If you are up to the challenge, [submit a pull request](#submit) with a fix! |
| 35 | + |
| 36 | + |
| 37 | +## <a name="feature"></a>Have a feature request? |
| 38 | + |
| 39 | +Great, we love hearing how we can improve our products! After making sure someone hasn't already |
| 40 | +requested the feature in the [existing issues](https://github.com/firebase/firebase-queue/issues), go |
| 41 | +ahead and [open a new issue](https://github.com/firebase/firebase-queue/issues/new). Feel free to remove |
| 42 | +the bug report template and instead provide an explanation of your feature request. Provide code |
| 43 | +samples if applicable. Try to think about what it will allow you to do that you can't do today? How |
| 44 | +will it make current workarounds straightforward? What potential bugs and edge cases does it help to |
| 45 | +avoid? |
| 46 | + |
| 47 | + |
| 48 | +## <a name="submit"></a>Want to submit a pull request? |
| 49 | + |
| 50 | +Sweet, we'd love to accept your contribution! [Open a new pull request](https://github.com/firebase/firebase-queue/pull/new/master) |
| 51 | +and fill out the provided form. |
| 52 | + |
| 53 | +**If you want to implement a new feature, please open an issue with a proposal first so that we can |
| 54 | +figure out if the feature makes sense and how it will work.** |
| 55 | + |
| 56 | +Make sure your changes pass our linter and the tests all pass on your local machine. We've hooked |
| 57 | +up this repo with continuous integration to double check those things for you. |
| 58 | + |
| 59 | +Most non-trivial changes should include some extra test coverage. If you aren't sure how to add |
| 60 | +tests, feel free to submit regardless and ask us for some advice. |
| 61 | + |
| 62 | +Finally, you will need to sign our [Contributor License Agreement](https://cla.developers.google.com/about/google-individual) |
| 63 | +before we can accept your pull request. |
| 64 | + |
| 65 | + |
| 66 | +## <a name="local-setup"></a>Need to get set up locally? |
| 67 | + |
| 68 | +If you'd like to contribute to Firebase Queue, you'll need to do the following to get your |
| 69 | +environment set up. |
| 70 | + |
| 71 | +### Install Dependencies |
| 72 | + |
| 73 | +```bash |
| 74 | +$ git clone https://github.com/firebase/firebase-queue.git |
| 75 | +$ cd firebase-queue # go to the firebase-queue directory |
| 76 | +$ npm install -g gulp # globally install gulp task runner |
| 77 | +$ npm install # install local npm build / test dependencies |
| 78 | +``` |
| 79 | + |
| 80 | +### Create a Firebase Project |
| 81 | + |
| 82 | +1. Create a Firebase project [here](https://console.firebase.google.com). |
| 83 | +2. Set the `FB_QUEUE_TEST_DB_URL` environment variable to your project's database URL: |
| 84 | + |
| 85 | +```bash |
| 86 | +$ export FB_QUEUE_TEST_DB_URL="https://<YOUR-DATABASE-NAME>.firebaseio.com" |
| 87 | +``` |
| 88 | + |
| 89 | +### Download a Service Account JSON File |
| 90 | + |
| 91 | +1. Follow the instructions [here](https://firebase.google.com/docs/server/setup#add_firebase_to_your_app) |
| 92 | +on how to create a service account for your project and furnish a private key. |
| 93 | +2. Copy the credentials JSON file to `test/key.json`. |
| 94 | + |
| 95 | +### Lint, Build, and Test |
| 96 | + |
| 97 | +```bash |
| 98 | +$ gulp # lint, build, and test |
| 99 | + |
| 100 | +$ gulp lint # just lint |
| 101 | +$ gulp build # just build |
| 102 | +$ gulp test # just test |
| 103 | +``` |
0 commit comments