diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-01-26 12:54:29 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-01-26 12:54:29 +0100 |
commit | cee7643f00e258c5f4b965b77f9618566b760179 (patch) | |
tree | 80fc6679940a733026ba25f984c2ac95bf4797c1 | |
parent | a53ec62e4a169d62b28c0f993e2df23b5d269a17 (diff) | |
download | gitbook-cee7643f00e258c5f4b965b77f9618566b760179.zip gitbook-cee7643f00e258c5f4b965b77f9618566b760179.tar.gz gitbook-cee7643f00e258c5f4b965b77f9618566b760179.tar.bz2 |
Call hook "init" when preparing generator
-rw-r--r-- | lib/generator.js | 7 |
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() { |