felixge/node-require-all — pull request #4 by thlorenz (2012-11-09 02:51:11+00:00)
Title: Allow to exclude dirs from being recursed into

- excludeDirs regex can be specified to exclude directories from being recursed into
- added fixtures test/filterdir and related tests inside tests.js
- updated readme to show this options

Example:
```js
var controllers = require('require-all')({
dirname : __dirname + '/controllers',
filter : /(.+Controller)\.js$/,
excludeDirs : /^\.(git|svn)$/
});
```

This feature becomes especially important if you are stuck with a version of svn that adds '.svn' folders everywhere. In order to prevent exports['.svn'] to be added, I can now exclude it.

This would also be of use if I'd like to make my `index.js` auto require all modules in lib folders, etc., In this case I'd need to be able to exclude '.git' and 'node_modules'.