+1
-1
| { | ||
| "name": "js-plugin", | ||
| "version": "1.0.3", | ||
| "version": "1.0.4", | ||
| "repository": "rekit/js-plugin", | ||
@@ -5,0 +5,0 @@ "main": "plugin.js", |
+4
-2
@@ -73,3 +73,3 @@ var _plugins = []; | ||
| if (!prop) { | ||
| return _plugins.filter(p => !p.deps || p.deps.every(dep => !!_byName[dep])); | ||
| prop = '.'; | ||
| } | ||
@@ -80,5 +80,7 @@ if (!_cache[prop]) { | ||
| // If deps not exist, then not load it. | ||
| const notExistDeps = p.deps.filter(dep => !_byName[dep]); | ||
| console.log(`Plugin ${p.name} is not loaded because its deps do not exist: ${notExistDeps}.`); | ||
| return false; | ||
| } | ||
| return _has(p, prop); | ||
| return prop === '.' ? true : _has(p, prop); | ||
| }); | ||
@@ -85,0 +87,0 @@ } |
16561
0.79%117
1.74%