diff options
author | Aaron O'Mullan <aaron.omullan@friendco.de> | 2014-04-24 01:28:04 -0700 |
---|---|---|
committer | Aaron O'Mullan <aaron.omullan@friendco.de> | 2014-04-24 01:28:04 -0700 |
commit | c4a67b6f2f5acff0218c737ef6061e79e1c1e4c6 (patch) | |
tree | a34ac2eec4420ae47cca472db52cfb28d33a8aa5 | |
parent | 3b70347625c8983834845ad485d6c8b30d942ac3 (diff) | |
download | gitbook-c4a67b6f2f5acff0218c737ef6061e79e1c1e4c6.zip gitbook-c4a67b6f2f5acff0218c737ef6061e79e1c1e4c6.tar.gz gitbook-c4a67b6f2f5acff0218c737ef6061e79e1c1e4c6.tar.bz2 |
Require plugin names to contain gitbook-*
Fixes #149, fixes GitBookIO/editor#12
-rw-r--r-- | lib/generate/plugin.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/generate/plugin.js b/lib/generate/plugin.js index 5bd332b..72b65b5 100644 --- a/lib/generate/plugin.js +++ b/lib/generate/plugin.js @@ -15,7 +15,6 @@ var Plugin = function(name) { this.infos = {}; _.each([ - name, "gitbook-"+name, "gitbook-plugin-"+name, "gitbook-theme-"+name @@ -112,7 +111,7 @@ Plugin.normalizeNames = function(names) { .uniq() .value(); - // Remove plugins starting with + // Remove plugins starting with names = _.filter(names, function(name) { return !_.contains(toremove, name) && !(name.length > 0 && name[0] == "-"); }); @@ -167,7 +166,7 @@ Plugin.fromList = function(names) { if (!withTpl) return null; return withTpl.resolveFile(withTpl.infos.templates[name]); - } + } }); }; |