diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-05-27 09:38:23 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-05-27 09:38:23 +0200 |
commit | b33a79704b686405e0730ff1baa61281c89b3c08 (patch) | |
tree | 8518dd382eab709c1c86c0033ba7e82b864a8dfb /lib/models | |
parent | 6def174b845d6dd392c2f1ef41e94b025b774bf8 (diff) | |
download | gitbook-b33a79704b686405e0730ff1baa61281c89b3c08.zip gitbook-b33a79704b686405e0730ff1baa61281c89b3c08.tar.gz gitbook-b33a79704b686405e0730ff1baa61281c89b3c08.tar.bz2 |
Switch plugin installation and resolveVersion to use PluginDependency instead of Plugin
Diffstat (limited to 'lib/models')
-rw-r--r-- | lib/models/pluginDependency.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/models/pluginDependency.js b/lib/models/pluginDependency.js index 99f6f91..e5deef0 100644 --- a/lib/models/pluginDependency.js +++ b/lib/models/pluginDependency.js @@ -1,4 +1,5 @@ var is = require('is'); +var semver = require('semver'); var Immutable = require('immutable'); var DEFAULT_VERSION = '*'; @@ -30,6 +31,15 @@ PluginDependency.prototype.isEnabled = function() { }; /** + Is the plugin using a git dependency + + @return {Boolean} +*/ +PluginDependency.prototype.isGitDependency = function() { + return !semver.validRange(this.getVersion()); +}; + +/** Create a plugin with a name and a plugin @param {String} |