summaryrefslogtreecommitdiffstats
path: root/lib/models/pluginDependency.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/models/pluginDependency.js')
-rw-r--r--lib/models/pluginDependency.js10
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}