From fde66ed8494ddbc3e6e60bc8162fd97a1d1d5ac2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Sun, 6 Apr 2014 13:49:51 -0700 Subject: [PATCH] bin/build after generation return all the options --- bin/build.js | 4 ++-- bin/gitbook.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/build.js b/bin/build.js index 49978b8a1..bea8ff949 100644 --- a/bin/build.js +++ b/bin/build.js @@ -47,8 +47,8 @@ var buildFunc = function(dir, options) { }) .then(function(output) { console.log("Successfuly built !"); - }, utils.logError) - .then(_.constant(outputDir)); + return output; + }, utils.logError); }; module.exports = buildFunc; \ No newline at end of file diff --git a/bin/gitbook.js b/bin/gitbook.js index ef842fbf1..136c2a57b 100755 --- a/bin/gitbook.js +++ b/bin/gitbook.js @@ -42,10 +42,10 @@ buildCommand(prog .option('-p, --port ', 'Port for server to listen on', 4000), function(dir, options) { buildFunc(dir, options) - .then(function(outputDir) { + .then(function(_options) { console.log(); console.log('Starting server ...'); - return utils.serveDir(outputDir, options.port) + return utils.serveDir(_options.output, options.port) .fail(utils.logError); }) .then(function() {