+6
-4
@@ -28,2 +28,3 @@ /*! | ||
| extend(this, source || {}); | ||
| this.plugins = {}; | ||
| this.loadPlugins(); | ||
@@ -74,6 +75,8 @@ this.run(); | ||
| return this.plugins = load(name, { | ||
| extend(this.plugins, load(name, { | ||
| omit: this._namespace, | ||
| cwd: process.cwd() | ||
| }); | ||
| })); | ||
| return this.plugins; | ||
| }; | ||
@@ -107,4 +110,3 @@ | ||
| while (i < keys.length) { | ||
| var fn = this.plugins[keys[i++]]; | ||
| this.plugin.call(this, fn, this); | ||
| this.plugins[keys[i++]](this); | ||
| }; | ||
@@ -111,0 +113,0 @@ }; |
+1
-1
| { | ||
| "name": "noun", | ||
| "description": "`.use()` plugins to manipulate objects. Easy to use and extend. Load locally defined plugins, or define a namespace to automatically load plugins from load modules.", | ||
| "version": "0.1.3", | ||
| "version": "0.1.4", | ||
| "homepage": "https://github.com/jonschlinkert/noun", | ||
@@ -6,0 +6,0 @@ "author": { |
+3
-3
@@ -52,3 +52,3 @@ # noun [](http://badge.fury.io/js/noun) | ||
| ### [.plugin](index.js#L47) | ||
| ### [.plugin](index.js#L48) | ||
@@ -67,3 +67,3 @@ Define a Noun plugin. | ||
| ### [.loadPlugins](index.js#L70) | ||
| ### [.loadPlugins](index.js#L71) | ||
@@ -81,3 +81,3 @@ Called in the constructor to load plugins from `node_modules` using the given `namespace`. For example, the namespace `foo` will load plugins from the `foo-*` glob pattern. | ||
| ### [.run](index.js#L100) | ||
| ### [.run](index.js#L103) | ||
@@ -84,0 +84,0 @@ Run an object of plugins. By default, the `.run()` method is called in the constructor, but it may also be used directly. |
+1
-1
@@ -33,3 +33,3 @@ /*! | ||
| var noun = new Noun('foo'); | ||
| noun.namespace.should.equal('foo'); | ||
| noun._namespace.should.equal('foo'); | ||
| }); | ||
@@ -36,0 +36,0 @@ |
14744
0.03%280
0.36%