mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-21 01:53:26 +00:00
Fix copy of plugins assets to output
This commit is contained in:
+5
-5
@@ -8,7 +8,7 @@ var PluginsList = function(book, plugins) {
|
||||
this.log = this.book.log;
|
||||
|
||||
// List of Plugin objects
|
||||
this.plugins = [];
|
||||
this.list = [];
|
||||
|
||||
// List of names of failed plugins
|
||||
this.failed = [];
|
||||
@@ -30,7 +30,7 @@ var PluginsList = function(book, plugins) {
|
||||
|
||||
// return count of plugins
|
||||
PluginsList.prototype.count = function() {
|
||||
return this.plugins.length;
|
||||
return this.list.length;
|
||||
};
|
||||
|
||||
// Add and load a plugin
|
||||
@@ -59,7 +59,7 @@ PluginsList.prototype.load = function(plugin, options) {
|
||||
that.log.info.ok();
|
||||
|
||||
// Push in the list
|
||||
that.plugins.push(plugin);
|
||||
that.list.push(plugin);
|
||||
}
|
||||
|
||||
// Extract filters
|
||||
@@ -96,7 +96,7 @@ PluginsList.prototype.load = function(plugin, options) {
|
||||
|
||||
// Call a hook
|
||||
PluginsList.prototype.hook = function(name, data) {
|
||||
return _.reduce(this.plugins, function(prev, plugin) {
|
||||
return _.reduce(this.list, function(prev, plugin) {
|
||||
return prev.then(function(ret) {
|
||||
return plugin.callHook(name, ret);
|
||||
});
|
||||
@@ -105,7 +105,7 @@ PluginsList.prototype.hook = function(name, data) {
|
||||
|
||||
// Return a template from a plugin
|
||||
PluginsList.prototype.template = function(name) {
|
||||
var withTpl = _.find(this.plugins, function(plugin) {
|
||||
var withTpl = _.find(this.list, function(plugin) {
|
||||
return (
|
||||
plugin.infos.templates &&
|
||||
plugin.infos.templates[name]
|
||||
|
||||
Reference in New Issue
Block a user