summaryrefslogtreecommitdiffstats
path: root/lib/models
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2016-06-10 18:34:24 +0200
committerSamy Pessé <samypesse@gmail.com>2016-06-10 18:34:24 +0200
commite8ee57be83adf3de2933373e7969c7675bf5372d (patch)
tree351acf4d6d35fd8e7f7895564394b87440c3ec71 /lib/models
parent50a132cb2c0b0666b3b067e32d37e10bfb9e50da (diff)
downloadgitbook-e8ee57be83adf3de2933373e7969c7675bf5372d.zip
gitbook-e8ee57be83adf3de2933373e7969c7675bf5372d.tar.gz
gitbook-e8ee57be83adf3de2933373e7969c7675bf5372d.tar.bz2
Start fixing order of plugins in dependencies
Diffstat (limited to 'lib/models')
-rw-r--r--lib/models/plugin.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/models/plugin.js b/lib/models/plugin.js
index c8bb2f7..acabba9 100644
--- a/lib/models/plugin.js
+++ b/lib/models/plugin.js
@@ -18,6 +18,9 @@ var Plugin = Immutable.Record({
// Depth of this plugin in the dependency tree
depth: Number(0),
+ // Parent depending on this plugin
+ parent: String(),
+
// Content of the "package.json"
package: Immutable.Map(),
@@ -49,6 +52,10 @@ Plugin.prototype.getDepth = function() {
return this.get('depth');
};
+Plugin.prototype.getParent = function() {
+ return this.get('parent');
+};
+
/**
* Return the ID on NPM for this plugin
* @return {String}