summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2016-02-25 12:03:33 +0100
committerSamy Pessé <samypesse@gmail.com>2016-02-25 12:03:33 +0100
commitedecf56dd6b9727b025e6529f0543d3d09222838 (patch)
tree189a4d847ae82ae3e8096f2e14bb0cdf7f32ec41 /lib
parent08754bc6266a8a23b4382963ef765a231ee5ed14 (diff)
downloadgitbook-edecf56dd6b9727b025e6529f0543d3d09222838.zip
gitbook-edecf56dd6b9727b025e6529f0543d3d09222838.tar.gz
gitbook-edecf56dd6b9727b025e6529f0543d3d09222838.tar.bz2
Use hook for configuration
Diffstat (limited to 'lib')
-rw-r--r--lib/output/base.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/output/base.js b/lib/output/base.js
index 6662443..491db95 100644
--- a/lib/output/base.js
+++ b/lib/output/base.js
@@ -59,6 +59,14 @@ Output.prototype.generate = function() {
});
})
+ // Transform the configuration
+ .then(function() {
+ return that.plugins.hook('config', that.book.config.dump())
+ .then(function(cfg) {
+ that.book.config.replace(cfg);
+ });
+ })
+
// Initialize the generation
.then(function() {
that.log.info.ln('preparing the generation');