mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-28 04:58:52 +00:00
bin/build after generation return all the options
This commit is contained in:
+2
-2
@@ -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;
|
||||
+2
-2
@@ -42,10 +42,10 @@ buildCommand(prog
|
||||
.option('-p, --port <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() {
|
||||
|
||||
Reference in New Issue
Block a user