Skip to content

Commit 3b069de

Browse files
bz2steren
authored andcommitted
Expand CONTRIBUTING.md documentation (#57)
Move developing and releasing headings from bottom of readme, and create new FAQ about contributing that links through. Update developing section to include details around the npm start command and demo application. Reformat CLA section and move section on planning to under code reviews.
1 parent 2aadaa5 commit 3b069de

2 files changed

Lines changed: 58 additions & 37 deletions

File tree

CONTRIBUTING.md

Lines changed: 57 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,65 @@
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.
224

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.
1425
Before you start working on a larger contribution, you should get in touch with
1526
us first through the issue tracker with your idea so that we can help out and
1627
possibly guide you. Coordinating up front makes it much easier to avoid
1728
frustration later on.
1829

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
2245

23-
### The small print
2446
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

README.md

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -241,21 +241,4 @@ import errorHandler from './errorHandlerUtility';
241241

242242
**Q: Are private source maps supported?** A: No, see [#4](https://github.com/GoogleCloudPlatform/stackdriver-errors-js/issues/4)
243243

244-
## Developing the library
245-
246-
Install developer dependencies with `npm install --dev`
247-
248-
* Run `npm test` or `yarn run test` to test your changes.
249-
* Run `npm run dist` or `yarn run dist` generates the minified version.
250-
251-
Start a web server at the root of this repo and open `demo/demo.html` to test reporting errors from the local library with your API key and project ID.
252-
253-
254-
## Creating a new release
255-
256-
* find and replace the version number package.json and commit
257-
* create a new git tag: `git tag v0.0.x`
258-
* push tag `git push --tags`
259-
* Create a [GitHub Release](https://github.com/GoogleCloudPlatform/stackdriver-errors-js/releases)
260-
* update on npm: `npm publish`
261-
* update the README to use this new published version in setup instructions and commit
244+
**Q: Can I propose changes to the library?** A: Yes, see [the Contributing documentation](CONTRIBUTING.md) for more details.

0 commit comments

Comments
 (0)