Permalink
Browse files

Make the module more moduley

  • Loading branch information...
1 parent fea1069 commit e78bfabb7a5e90efb4c8b0267b338977edb2e737 @isaacs isaacs committed Jun 17, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 promzard.js
View
6 promzard.js
@@ -89,10 +89,12 @@ PromZard.prototype.loaded = function () {
this.walk()
}
-PromZard.prototype.makeModule = function (path) {
- var mod = new Module(path, module)
+PromZard.prototype.makeModule = function () {
+ var mod = new Module(this.file, module)
mod.loaded = true
mod.filename = this.file
+ mod.id = this.file
+ mod.paths = Module._nodeModulePaths(path.dirname(this.file))
return mod
}

0 comments on commit e78bfab

Please sign in to comment.