]> git.gir.st - VimFx.git/blob - CONTRIBUTING.md
Update zh-CN localization
[VimFx.git] / CONTRIBUTING.md
1 # Contributing
2
3 ## Reporting issues
4
5 First off, write in English!
6
7 Secondly, search both open and closed issues, to avoid duplicates.
8
9 Include this in bug reports:
10
11 - VimFx version, Firefox version, keyboard layout and operating system.
12 - Steps to reproduce.
13 - Whether the bug is a regression or not (if you know). Bonus points for
14 telling since when the bug appeared.
15
16 If you’re suggesting a new feature always state your use case. Try to do it
17 both in general and with a really specific example.
18
19 Lastly, don’t hesitate to open issues!
20
21
22 ## Localizing
23
24 Contribute your localization! See `locale` folder.
25
26 Send your pull request to the **master** branch (no matter if it is a new
27 locale or an update to an existing one).
28
29
30 ## Developing
31
32 ### Versioning and branches
33
34 VimFx uses three numbers to describe its version: x.y.z, or major.minor.patch.
35 However, in reality it is more like 0.y.z. The first number (major) won’t
36 change until we feel that we don’t have any major changes coming. So until then
37 it is only worth describing the two other numbers.
38
39 The middle number (minor) is incremented when a release contains new features,
40 major refactors or changes to defaults. The idea is that when a user installs a
41 new minor release, they should expect changes that they need to get familiar
42 with.
43
44 The last number (patch) is incremented when a release contains only (simple)
45 bugfixes, new localizations and updates to localizations. If a user installs a
46 new patch release they shouldn’t have to get familiar with anything. Things
47 should be like they were before, just a little better.
48
49 VimFx uses two branches: **master** and **develop**. master is the latest
50 stable version plus trivial bugfixes. develop is the next minor version. master
51 is merged into develop when needed, and develop is merged into master before it
52 is going to be released.
53
54 In short, “backwards-incomptaible” changes and new features go into the develop
55 branch, while most other things go into the master branch.
56
57 ### Pull requests
58
59 Create a new topic branch, based on either master or develop. See above.
60
61 git checkout -b myTopicBranch master
62 # or
63 git checkout -b myTopicBranch develop
64
65 Code! Try to follow the following simple rules:
66
67 - Always use parenthesis when calling functions. (Except `require`.)
68 - Always use explicit `return`s, unless the function is a one-liner.
69 - Always use single quotes, unless you use interpolation.
70 - Prefer interpolation over concatenation, both in strings and in regexes.
71 - Always use the following forms (not any aliases):
72 - `true` and `false`
73 - `==` and `!=`
74 - `and` and `or`
75 - `not`
76 - Put spaces inside `[]` and `{}` when destructuring and interpolating, but not
77 in array and object literals.
78 - Comment when necessary. Comments should be full sentences.
79 - Try to keep lines at most 80 characters long.
80 - Indent using two spaces.
81
82 Break up your pull request in several commits if necessary. The first line of
83 commit messages should be a short summary. Add a blank line and then a nicely
84 formatted markdown description after it if needed.
85
86 Finally send a pull request to same branch as you based your topic branch on
87 (master or develop).
88
89 ### Tips:
90
91 - Compile the .coffee files with the **`--bare`** option! Otherwise you will
92 get errors.
93 - Run `coffee -cbw .` from the root of the project to automatically compile on
94 changes.
95 - Put a file called exactly `VimFx@akhodakivskiy.github.com` in the extensions/
96 folder of a Firefox profile, containing the absolute path to the extension/
97 folder in the project. Then you just need to restart Firefox (use some
98 add-on!) after each change. More details in this [MDN article][mdn-extdevenv].
99 - Only create tickets for issues and feature requests in English. Otherwise
100 duplicate tickets in different languages will pile up.
101
102 [mdn-extdevenv]: https://developer.mozilla.org/en-US/docs/Setting_up_extension_development_environment#Firefox_extension_proxy_file
Imprint / Impressum