|
| 1 | +# Contributing |
| 2 | + |
| 3 | +## Setting up an Environment |
| 4 | + |
| 5 | +To run the test suite and run our code linter, node.js and npm are required. If you don't have node installed, [get it here](http://nodejs.org/download/) first. |
| 6 | + |
| 7 | +Installing all other dependencies is as simple as: |
| 8 | + |
| 9 | +```bash |
| 10 | +$ npm install |
| 11 | +``` |
| 12 | + |
| 13 | +And if you don't have [Grunt](http://gruntjs.com/) already, feel free to install that globally: |
| 14 | + |
| 15 | +```bash |
| 16 | +$ npm install -g grunt-cli |
| 17 | +``` |
| 18 | + |
| 19 | +## Running the Test Suite |
| 20 | + |
| 21 | +The test suite is powered by [Mocha](http://visionmedia.github.com/mocha/) and can both run from the command line or in the browser. |
| 22 | + |
| 23 | +From the command line: |
| 24 | + |
| 25 | +```bash |
| 26 | +$ grunt test |
| 27 | +``` |
| 28 | + |
| 29 | +From your browser: |
| 30 | + |
| 31 | +```bash |
| 32 | +$ grunt run:test |
| 33 | +``` |
| 34 | + |
| 35 | +Then visit: http://localhost:8000/test/ |
| 36 | + |
| 37 | +## Compiling Raven.js |
| 38 | + |
| 39 | +The simplest way to compile your own version of Raven.js is with the supplied grunt command: |
| 40 | + |
| 41 | +```bash |
| 42 | +$ grunt build |
| 43 | +``` |
| 44 | + |
| 45 | +By default, this will compile raven.js and all of the included plugins. |
| 46 | + |
| 47 | +If you only want to compile the core raven.js: |
| 48 | + |
| 49 | +```bash |
| 50 | +$ grunt build.core |
| 51 | +``` |
| 52 | + |
| 53 | +Files are compiled into `build/`. |
| 54 | + |
| 55 | +## Contributing Back Code |
| 56 | + |
| 57 | +Please, send over suggestions and bug fixes in the form of pull requests on [GitHub](https://github.com/getsentry/raven-js). Any nontrivial fixes/features should include tests. |
| 58 | +Do not include any changes to the `dist/` folder or bump version numbers yourself. |
| 59 | + |
| 60 | +## Documentation |
| 61 | + |
| 62 | +The documentation is written using [reStructuredText](http://en.wikipedia.org/wiki/ReStructuredText), and compiled using [Sphinx](http://sphinx-doc.org/). If you don't have Sphinx installed, you can do it using following command (assuming you have Python already installed in your system): |
| 63 | + |
| 64 | +```bash |
| 65 | +$ pip install sphinx |
| 66 | +``` |
| 67 | + |
| 68 | +Documentation can be then compiled by running: |
| 69 | + |
| 70 | +```bash |
| 71 | +$ make docs |
| 72 | +``` |
| 73 | + |
| 74 | +Afterwards you can view it in your browser by running following command and than pointing your browser to http://127.0.0.1:8000/: |
| 75 | + |
| 76 | +```bash |
| 77 | +$ grunt run:docs |
| 78 | +``` |
| 79 | + |
| 80 | +## Releasing New Version |
| 81 | + |
| 82 | +* Bump version numbers in both `package.json` and `bower.json`. |
| 83 | +* `$ grunt dist` This will compile a new version and update it in the `dist/` folder. |
| 84 | +* Confirm that build was fine, etc. |
| 85 | +* Commit new version, create a tag. Push to GitHub. |
| 86 | +* `$ grunt publish` to recompile all plugins and all permutations and upload to S3. |
| 87 | +* `$ npm publish` to push to npm. |
| 88 | +* Confirm that the new version exists behind `cdn.ravenjs.com` |
| 89 | +* Update version in the `gh-pages` branch specifically for http://ravenjs.com/. |
| 90 | +* glhf |
0 commit comments