|
1 | 1 | # Contributing to js-data-mongodb
|
2 | 2 |
|
3 |
| -[Read the general Contributing Guide](http://js-data.io/docs/contributing). |
| 3 | +Dear contributor, |
4 | 4 |
|
| 5 | +**Thank you!** Projects like this are successful because of you! |
| 6 | + |
| 7 | +## Getting started |
| 8 | + |
| 9 | +1. Read the the general [JSData Contributing Guide](http://js-data.io/docs/contributing) |
| 10 | +1. To report a bug or request a feature, please [open an issue](https://github.com/js-data/js-data-mongodb/issues/new) |
| 11 | + * Be sure to search the existing issues to prevent duplication |
| 12 | + * Give your issue a short but descriptive title |
| 13 | + * For bug reports, please include all steps to reproduce the error |
| 14 | + * For feature requests, please include details of your use case |
| 15 | +1. To improve to the JSData + MongoDB tutorial, go to [js-data.io/v3.0/docs/js-data-mongodb](http://www.js-data.io/v3.0/docs/js-data-mongodb) and click "Suggest Edits" |
| 16 | +1. To improve the API Reference Documentation, write a test, fix a bug, or add a feature: |
| 17 | + 1. Create a fork of github.com/js-data/js-data-mongodb. [Click here](https://github.com/js-data/js-data-mongodb#fork-destination-box) to do so now. |
| 18 | + 1. Clone your fork: |
| 19 | + |
| 20 | + ``` |
| 21 | + git clone git@github.com:YOUR_USERNAME/js-data-mongodb.git |
| 22 | + ``` |
| 23 | + 1. Change directory to `js-data-mongodb`: |
| 24 | +
|
| 25 | + ``` |
| 26 | + cd js-data-mongodb |
| 27 | + ``` |
| 28 | + 1. Install development dependencies |
| 29 | +
|
| 30 | + ``` |
| 31 | + npm install js-data@rc bson mongodb |
| 32 | + npm install |
| 33 | + ``` |
| 34 | +1. To just update API Reference Documentation, make changes to the [JSDoc](http://usejsdoc.org/) comments in the source code. To regenerate the API documentation: |
| 35 | +
|
| 36 | + ``` |
| 37 | + npm run doc |
| 38 | + ``` |
| 39 | +
|
| 40 | + You can find the regenerated API Reference Documentation in the `doc/` folder. |
| 41 | +1. To write a test, fix a bug, or add a feature, make your changes to files in the `src/` and `test/` folders. |
| 42 | +1. To run the tests, first make sure MongoDB is running in another terminal window: |
| 43 | +
|
| 44 | + ``` |
| 45 | + mongod --config /path/to/mongod.conf |
| 46 | + ``` |
| 47 | +1. Now run the tests: |
| 48 | +
|
| 49 | + ``` |
| 50 | + npm test |
| 51 | + ``` |
| 52 | + |
5 | 53 | ## Project structure
|
6 | 54 |
|
| 55 | +* `coverage/` - Code coverage report produced by `npm test` |
7 | 56 | * `dist/` - Contains final build files for distribution
|
8 | 57 | * `doc/` - Output folder for JSDocs
|
9 | 58 | * `src/` - Project source code
|
10 | 59 | * `test/` - Project tests
|
11 | 60 |
|
12 |
| -## Clone, build & test |
13 |
| - |
14 |
| -1. `clone git@github.com:js-data/js-data-mongodb.git` |
15 |
| -1. `cd js-data-mongodb` |
16 |
| -1. `npm install` |
17 |
| -1. `npm run build` - Lint and build distribution files |
18 |
| -1. `npm run mocha` - Run tests (RethinkDB must be running) |
19 |
| - |
20 | 61 | ## To cut a release
|
21 | 62 |
|
22 |
| -1. Checkout master |
| 63 | +1. `git checkout master` |
23 | 64 | 1. Bump version in `package.json` appropriately
|
24 | 65 | 1. Update `CHANGELOG.md` appropriately
|
25 |
| -1. Run `npm run release` |
26 |
| -1. Commit and push changes |
27 |
| -1. Checkout `release`, merge `master` into `release` |
28 |
| -1. Run `npm run release` again |
29 |
| -1. Commit and push changes |
30 |
| -1. Make a GitHub release |
| 66 | +1. `npm run release` |
| 67 | +1. Commit and push changes (message should be something like "Prepare for VERSION") |
| 68 | +1. `git checkout release` |
| 69 | +1. `git merge master` |
| 70 | +1. `npm run release` |
| 71 | +1. Commit and push changes (message should be something like "VERSION") |
| 72 | +1. [Make a new GitHub release](https://github.com/js-data/js-data-mongodb/releases/new) |
31 | 73 | - tag from `release` branch
|
32 | 74 | - set tag name to version
|
33 | 75 | - set release name to version
|
34 | 76 | - set release body to changelog entry for the version
|
35 | 77 | 1. `npm publish .`
|
| 78 | +1. `git checkout gh-pages` |
| 79 | +1. `cp -r doc/js-data-mongodb/VERSION VERSION` |
| 80 | +1. `cp -r doc/js-data-mongodb/VERSION latest` |
| 81 | +1. `git add -A` |
| 82 | +1. `git commit -m "VERSION"` |
| 83 | +1. `git push -u origin gh-pages` |
| 84 | +1. `git checkout master` |
36 | 85 |
|
37 |
| -See also [Community & Support](http://js-data.io/docs/community). |
| 86 | +See also [JSData Community & Support](http://js-data.io/docs/community). |
0 commit comments