From ab5a1bef7829bacd95e6034dd8f4354df665f2ba Mon Sep 17 00:00:00 2001 From: Mark Dalgleish Date: Thu, 26 Jun 2014 07:27:52 +1000 Subject: [PATCH] Make options parameter optional This allows the module to be used like so: ghpages.deploy(basePath, callback) --- lib/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/index.js b/lib/index.js index c01d721..201ff81 100644 --- a/lib/index.js +++ b/lib/index.js @@ -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',