|
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 | + |
| 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 | +
|
| 53 | +1. Commit your changes, submit a Pull Request, and wait for review! |
4 | 54 |
|
5 | 55 | ## Project structure |
6 | 56 |
|
| 57 | +* `coverage/` - Code coverage report produced by `npm test` |
7 | 58 | * `dist/` - Contains final build files for distribution |
8 | 59 | * `doc/` - Output folder for JSDocs |
9 | 60 | * `src/` - Project source code |
10 | 61 | * `test/` - Project tests |
11 | 62 |
|
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 | 63 | ## To cut a release |
21 | 64 |
|
22 | | -1. Checkout master |
| 65 | +1. `git checkout master` |
23 | 66 | 1. Bump version in `package.json` appropriately |
24 | 67 | 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 |
| 68 | +1. `npm run release` |
| 69 | +1. Commit and push changes (message should be something like "Prepare for VERSION") |
| 70 | +1. `git checkout release` |
| 71 | +1. `git merge master` |
| 72 | +1. `npm run release` |
| 73 | +1. Commit and push changes (message should be something like "VERSION") |
| 74 | +1. [Make a new GitHub release](https://github.com/js-data/js-data-mongodb/releases/new) |
31 | 75 | - tag from `release` branch |
32 | 76 | - set tag name to version |
33 | 77 | - set release name to version |
34 | 78 | - set release body to changelog entry for the version |
35 | 79 | 1. `npm publish .` |
| 80 | +1. `git checkout gh-pages` |
| 81 | +1. `cp -r doc/js-data-mongodb/VERSION VERSION` |
| 82 | +1. `cp -r doc/js-data-mongodb/VERSION latest` |
| 83 | +1. `git add -A` |
| 84 | +1. `git commit -m "VERSION"` |
| 85 | +1. `git push -u origin gh-pages` |
| 86 | +1. `git checkout master` |
36 | 87 |
|
37 | | -See also [Community & Support](http://js-data.io/docs/community). |
| 88 | +See also [JSData Community & Support](http://js-data.io/docs/community). |
0 commit comments