summaryrefslogtreecommitdiffstats
path: root/lib/models/plugin.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/models/plugin.js')
-rw-r--r--lib/models/plugin.js15
1 files changed, 4 insertions, 11 deletions
diff --git a/lib/models/plugin.js b/lib/models/plugin.js
index 23019aa..e3d6c4d 100644
--- a/lib/models/plugin.js
+++ b/lib/models/plugin.js
@@ -1,9 +1,10 @@
var Immutable = require('immutable');
var TemplateBlock = require('./templateBlock');
-var PREFIX = require('../constants/pluginPrefix');
var DEFAULT_VERSION = '*';
+var PluginDependency = require('./pluginDependency');
+
var Plugin = Immutable.Record({
name: String(),
@@ -53,7 +54,7 @@ Plugin.prototype.getDepth = function() {
@return {String}
*/
Plugin.prototype.getNpmID = function() {
- return Plugin.nameToNpmID(this.getName());
+ return PluginDependency.nameToNpmID(this.getName());
};
/**
@@ -152,14 +153,6 @@ Plugin.createFromDep = function(dep) {
});
};
-/**
- Return NPM id for a plugin name
-
- @param {String}
- @return {String}
-*/
-Plugin.nameToNpmID = function(s) {
- return PREFIX + s;
-};
+Plugin.nameToNpmID = PluginDependency.nameToNpmID;
module.exports = Plugin;