|
| 1 | +# How to become a contributor and submit your own code |
| 2 | + |
| 3 | +**Table of contents** |
| 4 | + |
| 5 | +* [Contributor License Agreements](#contributor-license-agreements) |
| 6 | +* [Contributing a patch](#contributing-a-patch) |
| 7 | +* [Running the tests](#running-the-tests) |
| 8 | +* [Releasing the library](#releasing-the-library) |
| 9 | + |
| 10 | +## Contributor License Agreements |
| 11 | + |
| 12 | +We'd love to accept your sample apps and patches! Before we can take them, we |
| 13 | +have to jump a couple of legal hurdles. |
| 14 | + |
| 15 | +Please fill out either the individual or corporate Contributor License Agreement |
| 16 | +(CLA). |
| 17 | + |
| 18 | + * If you are an individual writing original source code and you're sure you |
| 19 | + own the intellectual property, then you'll need to sign an [individual CLA] |
| 20 | + (https://developers.google.com/open-source/cla/individual). |
| 21 | + * If you work for a company that wants to allow you to contribute your work, |
| 22 | + then you'll need to sign a [corporate CLA] |
| 23 | + (https://developers.google.com/open-source/cla/corporate). |
| 24 | + |
| 25 | +Follow either of the two links above to access the appropriate CLA and |
| 26 | +instructions for how to sign and return it. Once we receive it, we'll be able to |
| 27 | +accept your pull requests. |
| 28 | + |
| 29 | +## Contributing A Patch |
| 30 | + |
| 31 | +1. Submit an issue describing your proposed change to the repo in question. |
| 32 | +1. The repo owner will respond to your issue promptly. |
| 33 | +1. If your proposed change is accepted, and you haven't already done so, sign a |
| 34 | + Contributor License Agreement (see details above). |
| 35 | +1. Fork the desired repo, develop and test your code changes. |
| 36 | +1. Ensure that your code adheres to the existing style in the code to which |
| 37 | + you are contributing. |
| 38 | +1. Ensure that your code has an appropriate set of tests which all pass. |
| 39 | +1. Submit a pull request. |
| 40 | + |
| 41 | +## Running the tests |
| 42 | + |
| 43 | +1. [Prepare your environment for Node.js setup][setup]. |
| 44 | + |
| 45 | +1. Install dependencies: |
| 46 | + |
| 47 | + npm install |
| 48 | + |
| 49 | +1. Run the tests: |
| 50 | + |
| 51 | + npm test |
| 52 | + |
| 53 | +1. Lint (and maybe fix) any changes: |
| 54 | + |
| 55 | + npm run fix |
| 56 | + |
| 57 | +[setup]: https://cloud.google.com/nodejs/docs/setup |
0 commit comments