|
1 | 1 | #Contributing Guidelines |
| 2 | + |
2 | 3 | So you want to contribute to Push, huh? Well lucky for you, it's really easy to do so, because you're just dealing with like, a few hundred lines of JavaScript. It's not hard. |
3 | 4 |
|
4 | 5 | Alright. Now calm down and take a few deep breaths. Here we go. All you have to remember is two commands... think you can do that? |
5 | 6 |
|
6 | 7 | To BUILD Push, just run: |
7 | 8 |
|
8 | | -``` |
9 | | -npm run build |
| 9 | +```bash |
| 10 | +$npm run build |
10 | 11 | ``` |
11 | 12 |
|
12 | | -To TEST Push, run: |
| 13 | +To TEST Push on BrowserStack, run: |
13 | 14 |
|
14 | | -``` |
15 | | -npm run test |
| 15 | +```bash |
| 16 | +$npm runtest |
16 | 17 | ``` |
17 | 18 |
|
18 | 19 | See? Not hard at all. Unfortunately the Notifications API doesn't always play nicely with local sites, so don't get discouraged if you try running Push in a local HTML file and it doesn't work. |
19 | 20 |
|
20 | | -###Testing & Travis ### |
| 21 | +To TEST Push on a specific, locally-installed browser, you can run one of the following: |
| 22 | + |
| 23 | +```bash |
| 24 | +$ npm run test:opera |
| 25 | +$ npm run test:firefox |
| 26 | +$ npm run test:chrome |
| 27 | +$ npm run test:safari |
| 28 | +``` |
| 29 | + |
| 30 | +###Testing & Travis |
| 31 | + |
21 | 32 | Push uses the[Karma](https://karma-runner.github.io/1.0/index.html) JavaScript test runner, so read up on that if you want to make changes to any of the tests that are run. These tests are run post-push by[Travis CI](https://travis-ci.org), so look into that if you want to make any Travis configuration changes. Although, at this point I'd say Travis is all set. The tests might want to be expanded though. |
22 | 33 |
|
23 | | -###REAL IMPORTANT STUFF ### |
| 34 | +###REAL IMPORTANT STUFF |
| 35 | + |
24 | 36 | **THERE IS ONLY ONE RULE TO PUSH CLUB** (and no, it's not that you can't talk about it).**WHENEVER** you make changes to`Push.js`,**RECOMPILE** and commit`push.min.js` as well. Until this build process can be wrapped into a sexy git hook of some sort, this is how changes to the library need to occur.**YOUR PR WILL NOT BE APPROVED UNLESS THIS HAPPENS**. That said, I did let it slide once because I wasn't thinking, but that's why I wrote this file to make sure it will never happen again. |
25 | 37 |
|
26 | 38 | Outside of that, contributing should not be at all scary and should be a fun and positive process. Now go out and write some killer JS! Wait... is there even such a thing? |