diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-04-25 10:32:44 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-04-25 10:32:44 +0200 |
commit | 4646ed8f4af184a33280d8fe1f978c7da5404725 (patch) | |
tree | b8c3102e539e4ff72a10536dd626c94ac5501b0c /lib/output/generateBook.js | |
parent | 3f5c8acb3cdbf71c429ad331d23698cc53358746 (diff) | |
download | gitbook-4646ed8f4af184a33280d8fe1f978c7da5404725.zip gitbook-4646ed8f4af184a33280d8fe1f978c7da5404725.tar.gz gitbook-4646ed8f4af184a33280d8fe1f978c7da5404725.tar.bz2 |
Fix plugins loading
Diffstat (limited to 'lib/output/generateBook.js')
-rw-r--r-- | lib/output/generateBook.js | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/lib/output/generateBook.js b/lib/output/generateBook.js index c35719b..ca19067 100644 --- a/lib/output/generateBook.js +++ b/lib/output/generateBook.js @@ -62,7 +62,17 @@ function generateBook(generator, book, options) { ) ) - .then(callHook.bind(null, 'init')) + .then( + callHook.bind(null, + 'init', + function(output) { + return {}; + }, + function(output) { + return output; + } + ) + ) .then(function(output) { if (!generator.onInit) { @@ -75,7 +85,16 @@ function generateBook(generator, book, options) { .then(generateAssets.bind(null, generator)) .then(generatePages.bind(null, generator)) - .then(callHook.bind(null, 'finish:before')) + .then(callHook.bind(null, + 'finish:before', + function(output) { + return {}; + }, + function(output) { + return output; + } + ) + ) .then(function(output) { if (!generator.onFinish) { @@ -83,6 +102,22 @@ function generateBook(generator, book, options) { } return generator.onFinish(output); + }) + + /*.then(callHook.bind(null, + 'finish', + function(output) { + return {}; + }, + function(output) { + return output; + } + ) + )*/ + + .then(function(output) { + var logger = output.getLogger(); + logger.info.ok('generation finished with success!'); }); } |