summaryrefslogtreecommitdiffstats
path: root/lib/generator.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-01-26 12:54:29 +0100
committerSamy Pessé <samypesse@gmail.com>2015-01-26 12:54:29 +0100
commitcee7643f00e258c5f4b965b77f9618566b760179 (patch)
tree80fc6679940a733026ba25f984c2ac95bf4797c1 /lib/generator.js
parenta53ec62e4a169d62b28c0f993e2df23b5d269a17 (diff)
downloadgitbook-cee7643f00e258c5f4b965b77f9618566b760179.zip
gitbook-cee7643f00e258c5f4b965b77f9618566b760179.tar.gz
gitbook-cee7643f00e258c5f4b965b77f9618566b760179.tar.bz2
Call hook "init" when preparing generator
Diffstat (limited to 'lib/generator.js')
-rw-r--r--lib/generator.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/generator.js b/lib/generator.js
index 9c4a2d3..8b310e7 100644
--- a/lib/generator.js
+++ b/lib/generator.js
@@ -26,7 +26,12 @@ BaseGenerator.prototype.callHook = function(name, data) {
// Prepare the genertor
BaseGenerator.prototype.prepare = function() {
- return this.preparePlugins();
+ var that = this;
+
+ return this.preparePlugins()
+ .then(function() {
+ return that.callHook("init");
+ });
};
BaseGenerator.prototype.preparePlugins = function() {