Skip to content

Commit

Permalink
Fixed baseDir detection it used with npm
Browse files Browse the repository at this point in the history
  • Loading branch information
fgnass committed Feb 10, 2011
1 parent 6218093 commit c09d6b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions index.js
@@ -1 +1,2 @@
module.id = 'express-jsdom';
module.exports = require('./lib/express-jsdom');
6 changes: 5 additions & 1 deletion lib/express-jsdom/index.js
Expand Up @@ -13,7 +13,11 @@ var fs = require('fs'),

var baseDir = (function() {
var p = module.parent;
return Path.dirname((p.id == 'express-jsdom' ? p.parent : p).filename);
while (p.id != 'express-jsdom') {
console.dir(p);
p = p.parent;
}
return Path.dirname(p.parent.filename);
}());

/**
Expand Down

0 comments on commit c09d6b4

Please sign in to comment.