Skip to content
Browse files

updated readme

  • Loading branch information...
1 parent 0710005 commit 74f32b442f776b0ab9cc596a27fc07ad6a0d4292 @tblobaum committed Dec 6, 2011
Showing with 16 additions and 9 deletions.
  1. +16 −9 README.md
View
25 README.md
@@ -3,25 +3,32 @@ 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.
-Installation
-------------
-
- npm install directory --save
-
-
Example
-------
+As an example, this may be your index.js file in a plugins directory that also
+contains all of your Model's plugins.
```javascript
var directory = require('directory')
-directory(function (module) {
- mongoose.plugin(module, {})
-})
+module.exports = function (models, options) {
+ options = options || { debug:false }
+
+ directory(function (module) {
+ models.plugin(module, options)
+ })
+
+}
````
+Installation
+------------
+
+ npm install directory --save
+
+
MIT License

0 comments on commit 74f32b4

Please sign in to comment.
Something went wrong with that request. Please try again.