Make options parameter optional

This allows the module to be used like so:
ghpages.deploy(basePath, callback)
This commit is contained in:
Mark Dalgleish 2014-06-26 07:27:52 +10:00
parent f610cf7348
commit ab5a1bef78

View file

@ -50,6 +50,11 @@ function getRepo(options) {
* Push a git branch to a remote (pushes gh-pages by default).
*/
exports.publish = function publish(basePath, config, done) {
if (typeof config === 'function') {
done = config;
config = {};
}
var defaults = {
add: false,
git: 'git',