diff options
author | Samy Pessé <samypesse@gmail.com> | 2014-09-17 15:02:22 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2014-09-17 15:02:22 +0200 |
commit | d69cc746472684195f5b628d0ee4dc79e10f59e1 (patch) | |
tree | c668eba1bc444a9d1e0f6a461a0759d234a1eb35 /lib/generate/generator.js | |
parent | be0a4f08e9a45efc4766632a787adbb187e931af (diff) | |
parent | f83874a9ca5877c9b5417e1603df9c9d3ffe19f2 (diff) | |
download | gitbook-d69cc746472684195f5b628d0ee4dc79e10f59e1.zip gitbook-d69cc746472684195f5b628d0ee4dc79e10f59e1.tar.gz gitbook-d69cc746472684195f5b628d0ee4dc79e10f59e1.tar.bz2 |
Merge pull request #440 from GitbookIO/feature/ebookplugins
Apply plugins to ebook generation
Diffstat (limited to 'lib/generate/generator.js')
-rw-r--r-- | lib/generate/generator.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/generate/generator.js b/lib/generate/generator.js index ad5f8ab..5367b8b 100644 --- a/lib/generate/generator.js +++ b/lib/generate/generator.js @@ -8,6 +8,9 @@ var Plugin = require("./plugin"); var BaseGenerator = function(options) { this.options = options; + // Base for assets in plugins + this.pluginAssetsBase = "book"; + this.options.plugins = Plugin.normalizeNames(this.options.plugins); this.options.plugins = _.union(this.options.plugins, this.options.defaultsPlugins); this.plugins = []; @@ -20,7 +23,9 @@ BaseGenerator.prototype.callHook = function(name, data) { BaseGenerator.prototype.loadPlugins = function() { var that = this; - return Plugin.fromList(this.options.plugins, this.options.input, this) + return Plugin.fromList(this.options.plugins, this.options.input, this, { + assetsBase: this.pluginAssetsBase + }) .then(function(_plugins) { that.plugins = _plugins; |