First, contributions are welcome! I expect smaller requests to be handled without issue. If you have a larger feature request that you want to contribute yourself, you might consider opening an issue first, as I make no guarantees about merging things, especially if they change the nature of the project, or make it do a lot more than it already does. I'm a proponent of small, concise, single-purpose modules that do one thing and do it well.
Please try to adhere, as close as possible, to the style and structure already present in this repository. I understand that people like things different ways, but as this is my repository, we'll be using my style preferences. If your pull request does not conform to this style, I'll simply ask you to clean it up. Please don't be offended. It doesn't mean I think your style preference is wrong or that mine is better. I just believe consistency is important in a repository. Notably, that means (among other things):
} else {Prefer
exports.foo = function() {
to
module.exports = {
foo: function() {
unless you're exporting a single a function.
Use spaces at the beginning and end of inline objects and arrays: { foo: 'bar' } and [ 'foo', 'bar' ]
But . . . if you have longer objects, please use line breaks like this:
var obj = {
foo: 'bar',
list: [
{
name: baz'
},
{
name: 'quux'
}
]
}
I could also be okay with the slightly more compact array-of-object format:
var obj = {
foo: 'bar',
list: [{
name: baz'
}, {
name: 'quux'
}]
}
Use semi-colons to end lines.
Please write tests for any added feature or bug fix. I use coffeescript for tests, with mocha and mocha-given, which has a nice, terse syntax. Tests are run with grunt. Grunt configuration is modularized via task-master and lives in the tasks directory (though you probably won't need to touch this).
I actually don't care much about commit message formatting or keeping a clean history via squashes. Obviously, if you want to do those things, go for the gold. In general, I think a commit message should be atomic (which is to say, if you need to use the word "and," then it should be two commits), should summarize the changes in the commit, and should use present tense, as in "Fix bug" (not "Fixed" or "Fixes").