diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..5f9beec --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,125 @@ +# Contributing | ReactFire + +Thank you for contributing to the Firebase community! + + - [Have a usage question?](#question) + - [Think you found a bug?](#issue) + - [Have a feature request?](#feature) + - [Want to submit a pull request?](#submit) + - [Need to get set up locally?](#local-setup) + + +## Have a usage question? + +We get lots of those and we love helping you, but GitHub is not the best place for them. Issues +which just ask about usage will be closed. Here are some resources to get help: + +- Start with the [quickstart](../docs/quickstart.md) +- Go through the [guide](../docs/guide.md) +- Read the full [API reference](../docs/reference.md) +- Try out some [examples](../examples/README.md) + +If the official documentation doesn't help, try asking a question through our +[official support channels](https://firebase.google.com/support/). + +**Please avoid double posting across multiple channels!** + + +## Think you found a bug? + +Yeah, we're definitely not perfect! + +Search through [old issues](https://github.com/firebase/reactfire/issues) before submitting a new +issue as your question may have already been answered. + +If your issue appears to be a bug, and hasn't been reported, +[open a new issue](https://github.com/firebase/reactfire/issues/new). Please use the provided bug +report template and include a minimal repro. + +If you are up to the challenge, [submit a pull request](#submit) with a fix! + + +## Have a feature request? + +Great, we love hearing how we can improve our products! After making sure someone hasn't already +requested the feature in the [existing issues](https://github.com/firebase/reactfire/issues), go +ahead and [open a new issue](https://github.com/firebase/reactfire/issues/new). Feel free to remove +the bug report template and instead provide an explanation of your feature request. Provide code +samples if applicable. Try to think about what it will allow you to do that you can't do today? How +will it make current workarounds straightforward? What potential bugs and edge cases does it help to +avoid? + + +## Want to submit a pull request? + +Sweet, we'd love to accept your contribution! [Open a new pull request](https://github.com/firebase/reactfire/pull/new/master) +and fill out the provided form. + +**If you want to implement a new feature, please open an issue with a proposal first so that we can +figure out if the feature makes sense and how it will work.** + +Make sure your changes pass our linter and the tests all pass on your local machine. We've hooked +up this repo with continuous integration to double check those things for you. + +Most non-trivial changes should include some extra test coverage. If you aren't sure how to add +tests, feel free to submit regardless and ask us for some advice. + +Finally, you will need to sign our [Contributor License Agreement](https://cla.developers.google.com/about/google-individual) +before we can accept your pull request. + + +## Need to get set up locally? + +If you'd like to contribute to ReactFire, you'll need to do the following to get your environment +set up. + +### Install Dependencies + +```bash +$ git clone https://github.com/firebase/reactfire.git +$ cd reactfire # go to the reactfire directory +$ npm install -g gulp # globally install gulp task runner +$ npm install -g bower # globally install Bower package manager +$ npm install # install local npm build / test dependencies +$ bower install # install local JavaScript dependencies +``` + +### Create a Firebase Project + +1. Create a Firebase project [here](https://console.firebase.google.com). +2. Set the project's Realtime Database Security Rules to public: + +```json +{ + "rules": { + ".read": true, + ".write": true + } +} +``` + +3. Set the `REACTFIRE_TEST_DB_URL` environment variable to your project's database URL: + +```bash +$ export REACTFIRE_TEST_DB_URL="https://.firebaseio.com" +``` + +### Download a Service Account JSON File + +1. Follow the instructions [here](https://firebase.google.com/docs/server/setup#add_firebase_to_your_app) +on how to create a service account for your project and furnish a private key. +2. Copy the credentials JSON file to `tests/key.json`. + +### Lint, Build, and Test + +```bash +$ gulp # lint, build, and test + +$ gulp lint # just lint +$ gulp build # just build +$ gulp test # just test + +$ gulp watch # lint and build whenever source files change +``` + +The output files - `reactfire.js` and `reactfire.min.js` - are written to the `/dist/` directory. diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..8bbab90 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,68 @@ + + + +### Version info + + + +**React:** + +**Firebase:** + +**ReactFire:** + +**Other (e.g. Node, browser, operating system) (if applicable):** + +### Test case + + + + +### Steps to reproduce + + + + +### Expected behavior + + + + +### Actual behavior + + diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..80efa77 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,31 @@ + + + +### Description + + + +### Code sample + + diff --git a/README.md b/README.md index f52339f..7394229 100644 --- a/README.md +++ b/README.md @@ -75,22 +75,5 @@ $ bower install reactfire --save ## Contributing -If you'd like to contribute to ReactFire, you'll need to run the following commands to get your -environment set up: - -```bash -$ git clone https://github.com/firebase/reactfire.git -$ cd reactfire # go to the reactfire directory -$ npm install -g gulp # globally install gulp task runner -$ npm install -g bower # globally install Bower package manager -$ npm install # install local npm build / test dependencies -$ bower install # install local JavaScript dependencies -$ gulp watch # watch for source file changes -``` - -`gulp watch` will watch for changes in the `/src/` directory and lint, concatenate, and minify the -source files when a change occurs. The output files - `reactfire.js` and `reactfire.min.js` - are -written to the `/dist/` directory. - -You can run the test suite by navigating to `file:///path/to/reactfire/tests/index.html` or via the -command line using `gulp test`. +If you'd like to contribute to ReactFire, please first read through our [contribution +guidelines](.github/CONTRIBUTING.md). Local setup instructions are available [here](.github/CONTRIBUTING.md#local-setup).