-
Notifications
You must be signed in to change notification settings - Fork 7
Contributing
Miha Frangez edited this page Mar 19, 2015
·
4 revisions
#Contributing Here, you will find everything you need to know about contributing to this project. ##Features
- Browser/server specific features: If the app runs as well as before on an unsupported browser/server, but has some additional functionallity on supported ones, the feature can be approved, but if the app breaks on unsupported ones, the change will be rejected.
- Cosmetic features: Adding cosmetic features is fine, as long as they don't poorly affect performance.
- Dependencies: If it can be done without an additional dependency, do it like that. If you really need to add an aditional lib, make sure you add the minified and smallest version. No jQueryUI!
- Updates: If the app breaks because of an update in something it uses, make sure to keep some backwards compatibility.
##Code style ###General Indentation by tabs
while (something) {
doSomething();
}
Single line comments for single line of code, multiline for functions and alike:
/* Short function for googling cats */
function getCats(number) {
return extractImages(Google.getImageSearch().query("cats", number)); // Extract cat images from google search
}
Empty lines separating functionally different code:
conf = readFromConfig();
conf.set("something", "something else");
conf.save();
// Newline separates config from cats
cats = getCats(Number.POSITIVE_INFINITY);
for (cat : cats) echo cat;
Open brackets on the same line as statement
if (something) {
} else {
}
Shorthand statements on same line
if (something) reutrn 1;
else return 0;
###PHP W.I.P. ###JavaScript W.I.P. ###HTML & CSS W.I.P.