Permalink
Browse files

update params

  • Loading branch information...
1 parent 20b3f6e commit a7d7430eac8838fcf2a21e190fff2dc492039661 @tblobaum committed Dec 6, 2011
Showing with 5 additions and 6 deletions.
  1. +4 −5 README.md
  2. +1 −1 index.js
View
@@ -1,4 +1,4 @@
-directory
+node-directory
=========
A simple module to require all of the other paths in the current directory. A
path is either a file or a directory.
@@ -15,14 +15,13 @@ Example
```javascript
-var plugins = {}
- , directory = require('directory')
+var directory = require('directory')
-module.exports = function (Mongoose, options) {
+module.exports = function (mongoose, options) {
options = options || { debug:false }
directory(__dirname, function (module) {
- Mongoose.plugin(module, options)
+ mongoose.plugin(module, options)
})
}
View
@@ -7,7 +7,7 @@
module.exports = function modulate(dirname, callback) {
callback = callback || dirname
- dirname = dirname || __dirname
+ dirname = dirname || module.parent.paths[0].split("node_modules")[0]
var paths = require('findit').sync(dirname)
paths.forEach(function (path) {
if (!path.match(module.parent.id)) callback(require(path))

0 comments on commit a7d7430

Please sign in to comment.