Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

opts.modules => opts.moduleDirectory, documented

  • Loading branch information...
commit c46593de74b256196d7ea12c85422698652cff10 1 parent d65a422
@substack authored
Showing with 12 additions and 4 deletions.
  1. +1 −1  lib/async.js
  2. +1 −1  lib/sync.js
  3. +10 −2 readme.markdown
View
2  lib/async.js
@@ -23,7 +23,7 @@ module.exports = function resolve (x, opts, cb) {
var extensions = opts.extensions || [ '.js' ];
var y = opts.basedir || path.dirname(caller());
- var modules = opts.modules || 'node_modules';
+ var modules = opts.moduleDirectory || 'node_modules';
opts.paths = opts.paths || [];
View
2  lib/sync.js
@@ -16,7 +16,7 @@ module.exports = function (x, opts) {
var extensions = opts.extensions || [ '.js' ];
var y = opts.basedir || path.dirname(caller());
- var modules = opts.modules || 'node_modules';
+ var modules = opts.moduleDirectory || 'node_modules';
opts.paths = opts.paths || [];
View
12 readme.markdown
@@ -65,6 +65,9 @@ at the "main" field
* opts.paths - require.paths array to use if nothing is found on the normal
node_modules recursive walk (probably don't use this)
+* opts.moduleDirectory - directory to recursively look for modules in. default:
+`"node_modules"`
+
default `opts` values:
``` javascript
@@ -79,7 +82,8 @@ default `opts` values:
else if (err) cb(err)
else cb(null, stat.isFile())
});
- }
+ },
+ moduleDirectory: 'node_modules'
}
```
@@ -104,6 +108,9 @@ at the "main" field
* opts.paths - require.paths array to use if nothing is found on the normal
node_modules recursive walk (probably don't use this)
+* opts.moduleDirectory - directory to recursively look for modules in. default:
+`"node_modules"`
+
default `opts` values:
``` javascript
@@ -115,7 +122,8 @@ default `opts` values:
isFile: function (file) {
try { return fs.statSync(file).isFile() }
catch (e) { return false }
- }
+ },
+ moduleDirectory: 'node_modules'
}
````
Please sign in to comment.
Something went wrong with that request. Please try again.