diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-01-27 12:49:08 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-01-27 12:49:08 +0100 |
commit | 54e1be1e775945b0f7e397c36a1ff1413c63f475 (patch) | |
tree | e08fe8e9738d02aa234ece356cffd11d35c9434e /lib/generator.js | |
parent | ce259eb4ec74dbcbff10938125ff00ba145befc3 (diff) | |
download | gitbook-54e1be1e775945b0f7e397c36a1ff1413c63f475.zip gitbook-54e1be1e775945b0f7e397c36a1ff1413c63f475.tar.gz gitbook-54e1be1e775945b0f7e397c36a1ff1413c63f475.tar.bz2 |
Parse plugins in book instead of generator
Diffstat (limited to 'lib/generator.js')
-rw-r--r-- | lib/generator.js | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/lib/generator.js b/lib/generator.js index 4ff1373..6557461 100644 --- a/lib/generator.js +++ b/lib/generator.js @@ -14,32 +14,18 @@ var BaseGenerator = function(book) { } }); - // Base for assets in plugins - this.pluginAssetsBase = "book"; - _.bindAll(this); }; BaseGenerator.prototype.callHook = function(name, data) { - return this.plugins.hook(name, data); + return this.book.plugins.hook(name, data); }; // Prepare the genertor BaseGenerator.prototype.prepare = function() { var that = this; - return this.preparePlugins() - .then(function() { - return that.callHook("init"); - }); -}; - -BaseGenerator.prototype.preparePlugins = function() { - var that = this; - return Plugin.normalize(that.book.plugins) - .then(function(_plugins) { - that.plugins = _plugins; - }); + return that.callHook("init"); }; // Write a parsed file to the output |