troygoode / node-require-directory

Recursively iterates over specified directory, requiring each file, and returning a nested hash structure containing those libraries.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fails when requiring empty directories

joaoafrmartins opened this issue · comments

if you try to require an empty directory (with no files in it) it fails with

retval[name] = m.require(joined);
^
TypeError: Object ....../test/fixture has no method 'require'

... on a footnote.. what would you think about an alternate function signature with an options parameter... so for example valid file extensions arent hardcoded? for example litcoffee... cson.. what have you...

This has been fixed for a while. Also, a new version that uses an options hash instead of multiple parameters is coming tonight.