1 | # Contributing
|
2 |
|
3 | We love pull requests from everyone.
|
4 |
|
5 | [Fork](https://help.github.com/articles/fork-a-repo/), then [clone](https://help.github.com/articles/cloning-a-repository/) the repo:
|
6 |
|
7 | ```
|
8 | git clone git@github.com:your-username/phonegap-plugin-push.git
|
9 | ```
|
10 |
|
11 | Set up a branch for your feature or bugfix with a link to the original repo:
|
12 |
|
13 | ```
|
14 | git checkout -b my-awesome-new-feature
|
15 | git push --set-upstream origin my-awesome-new-feature
|
16 | git remote add upstream https://github.com/phonegap/phonegap-plugin-push.git
|
17 | ```
|
18 |
|
19 | Set up the project:
|
20 |
|
21 | ```
|
22 | npm install
|
23 | ```
|
24 |
|
25 | Make sure the tests pass before changing anything:
|
26 |
|
27 | ```
|
28 | npm test
|
29 | ```
|
30 |
|
31 | Make your change. Add tests for your change. Make the tests pass:
|
32 |
|
33 | ```
|
34 | npm test
|
35 | ```
|
36 |
|
37 | Commit changes:
|
38 |
|
39 | ```
|
40 | git commit -m "Cool stuff"
|
41 | ```
|
42 |
|
43 | Consider starting the commit message with an applicable emoji:
|
44 | * :art: `:art:` when improving the format/structure of the code
|
45 | * :zap: `:zap:` when improving performance
|
46 | * :non-potable_water: `:non-potable_water:` when plugging memory leaks
|
47 | * :memo: `:memo:` when writing docs
|
48 | * :ambulance: `:ambulance:` a critical hotfix.
|
49 | * :sparkles: `:sparkles:` when introducing new features
|
50 | * :bookmark: `:bookmark:` when releasing / version tags
|
51 | * :rocket: `:rocket:` when deploying stuff
|
52 | * :penguin: `:penguin:` when fixing something on Android
|
53 | * :apple: `:apple:` when fixing something on iOS
|
54 | * :checkered_flag: `:checkered_flag:` when fixing something on Windows
|
55 | * :bug: `:bug:` when fixing a bug
|
56 | * :fire: `:fire:` when removing code or files
|
57 | * :green_heart: `:green_heart:` when fixing the CI build
|
58 | * :white_check_mark: `:white_check_mark:` when adding tests
|
59 | * :lock: `:lock:` when dealing with security
|
60 | * :arrow_up: `:arrow_up:` when upgrading dependencies
|
61 | * :arrow_down: `:arrow_down:` when downgrading dependencies
|
62 | * :shirt: `:shirt:` when removing linter warnings
|
63 | * :hammer: `:hammer:` when doing heavy refactoring
|
64 | * :heavy_minus_sign: `:heavy_minus_sign:` when removing a dependency.
|
65 | * :heavy_plus_sign: `:heavy_plus_sign:` when adding a dependency.
|
66 | * :wrench: `:wrench:` when changing configuration files.
|
67 | * :globe_with_meridians: `:globe_with_meridians:` when dealing with internationalization and localization.
|
68 | * :pencil2: `:pencil2:` when fixing typos.
|
69 | * :hankey: `:hankey:` when writing bad code that needs to be improved.
|
70 | * :package: `:package:` when updating compiled files or packages.
|
71 |
|
72 | Make sure your branch is up to date with the original repo:
|
73 |
|
74 | ```
|
75 | git fetch upstream
|
76 | git merge upstream/master
|
77 | ```
|
78 |
|
79 | Review your changes and any possible conflicts and push to your fork:
|
80 |
|
81 | ```
|
82 | git push origin
|
83 | ```
|
84 |
|
85 | [Submit a pull request](https://help.github.com/articles/creating-a-pull-request/).
|
86 |
|
87 | At this point you're waiting on us. We do our best to keep on top of all the pull requests. We may suggest some changes, improvements or alternatives.
|
88 |
|
89 | Some things that will increase the chance that your pull request is accepted:
|
90 |
|
91 | - Write tests.
|
92 | - Write a [good commit message](http://chris.beams.io/posts/git-commit/).
|
93 | - Make sure the PR merges cleanly with the latest master.
|
94 | - Describe your feature/bugfix and why it's needed/important in the pull request description.
|
95 |
|
96 |
|
97 | ## Editor Config
|
98 |
|
99 | The project uses [.editorconfig](http://editorconfig.org/) to define the coding
|
100 | style of each file. We recommend that you install the Editor Config extension
|
101 | for your preferred IDE. Consistency is key.
|
102 |
|
103 | ## ESLint
|
104 |
|
105 | The project uses [.eslint](http://eslint.org/) to define the JavaScript
|
106 | coding conventions. Most editors now have a ESLint add-on to provide on-save
|
107 | or on-edit linting.
|