|
1 | | -Want to contribute? Great! First, read this page (including the small print at the end). |
| 1 | +Want to contribute? Great! First, read this page — including the section on |
| 2 | +licensing your contribution. |
| 3 | + |
| 4 | +## Developing |
| 5 | + |
| 6 | +After cloning the repository, use [npm] or [yarn] to install dependencies and |
| 7 | +run package commands. Examples using npm but the same commands work with yarn: |
| 8 | + |
| 9 | +* Run `npm install` to get all the dependencies. |
| 10 | +* Run `npm test` to lint and test your changes. |
| 11 | +* Run `npm run dist` to generate the minified version. |
| 12 | +* Run `npm start` to spawn a web server and load the demo in a browser. |
| 13 | + |
| 14 | +The demo allows you to test reporting errors from the local library with your |
| 15 | +own API key and project ID, see the network tab of your browser dev tools for |
| 16 | +the specific requests that get sent. Note you can expect to see |
| 17 | +[CORS preflight requests] but the behaviour once deployed can vary. |
| 18 | + |
| 19 | +## Code reviews |
| 20 | + |
| 21 | +All submissions, including submissions by project members, require review. We |
| 22 | +use Github pull requests for this purpose. Once submitted, [Travis CI] will |
| 23 | +automatically run the tests on your change, please check that this passes. |
2 | 24 |
|
3 | | -### Before you contribute |
4 | | -Before we can use your code, you must sign the |
5 | | -[Google Individual Contributor License Agreement] |
6 | | -(https://cla.developers.google.com/about/google-individual) |
7 | | -(CLA), which you can do online. The CLA is necessary mainly because you own the |
8 | | -copyright to your changes, even after your contribution becomes part of our |
9 | | -codebase, so we need your permission to use and distribute your code. We also |
10 | | -need to be sure of various other things—for instance that you'll tell us if you |
11 | | -know that your code infringes on other people's patents. You don't have to sign |
12 | | -the CLA until after you've submitted your code for review and a member has |
13 | | -approved it, but you must do it before we can put your code into our codebase. |
14 | 25 | Before you start working on a larger contribution, you should get in touch with |
15 | 26 | us first through the issue tracker with your idea so that we can help out and |
16 | 27 | possibly guide you. Coordinating up front makes it much easier to avoid |
17 | 28 | frustration later on. |
18 | 29 |
|
19 | | -### Code reviews |
20 | | -All submissions, including submissions by project members, require review. We |
21 | | -use Github pull requests for this purpose. |
| 30 | +## Licensing your contribution |
| 31 | + |
| 32 | +Before we can use your code, you must sign the |
| 33 | +[Google Individual Contributor License Agreement] or 'CLA', which you can do |
| 34 | +online. |
| 35 | + |
| 36 | +The CLA is necessary mainly because you own the copyright to your changes, even |
| 37 | +after your contribution becomes part of our codebase, so we need your |
| 38 | +permission to use and distribute your code. We also need to be sure of various |
| 39 | +other things — for instance that you'll tell us if you know that your code |
| 40 | +infringes on other people's patents. You don't have to sign the CLA until after |
| 41 | +you've submitted your code for review and a member has approved it, but you |
| 42 | +must do it before we can put your code into our codebase. |
| 43 | + |
| 44 | +### Contributions by corporations |
22 | 45 |
|
23 | | -### The small print |
24 | 46 | Contributions made by corporations are covered by a different agreement than |
25 | | -the one above, the |
26 | | -[Software Grant and Corporate Contributor License Agreement] |
27 | | -(https://cla.developers.google.com/about/google-corporate). |
| 47 | +the one above, the [Software Grant and Corporate Contributor License Agreement]. |
| 48 | + |
| 49 | +## Creating a new release |
| 50 | + |
| 51 | +* find and replace the version number package.json and commit |
| 52 | +* create a new git tag: `git tag v0.0.x` |
| 53 | +* push tag `git push --tags` |
| 54 | +* Create a [GitHub Release] |
| 55 | +* update on npm: `npm publish` |
| 56 | +* update the README to use this new published version in setup instructions and commit |
| 57 | + |
| 58 | + |
| 59 | +[npm]: https://www.npmjs.com/ |
| 60 | +[yarn]: https://yarnpkg.com/ |
| 61 | +[CORS preflight requests]: https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request |
| 62 | +[Travis CI]: https://docs.travis-ci.com/ |
| 63 | +[Google Individual Contributor License Agreement]: https://cla.developers.google.com/about/google-individual |
| 64 | +[Software Grant and Corporate Contributor License Agreement]: https://cla.developers.google.com/about/google-corporate |
| 65 | +[GitHub Release]: https://github.com/GoogleCloudPlatform/stackdriver-errors-js/releases |
0 commit comments