summaryrefslogtreecommitdiffstats
path: root/lib/output/generateBook.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/output/generateBook.js')
-rw-r--r--lib/output/generateBook.js39
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!');
});
}