Starting with mystic-noggin, I want to start keeping track of my project guidelines so that I can keep my projects consistent!...maybe.
- main 3 directories
- pub: contains all generated files (usually from Grunt)
- src: all source code. Within there are 'client' and 'server sections
- test: all the tests for the src/ code
- try to comment as much as possible, but don't comment on the obvious
- keep it readable
// bad
var i=0;
//good
var i = 0;
- 2 space indentation, spaces only
- no space after
function name
declaration and(
- hoist variable declarations whenever possible
{
on same line,}
on newline- exception is for small statements like:
...
if (x) { return obj; }
...