├── .gitignore ├── .travis.yml ├── CHANGELOG.md ├── LICENSE ├── README.md ├── index.js ├── package.json └── test ├── camelcase ├── a_main.js └── sub-dir │ └── a-sub.js ├── duplicates.js ├── duplicates ├── a.js ├── b.json ├── b │ ├── 1.js │ ├── 1.txt │ ├── 2.js │ └── 2.json ├── c.txt ├── c │ └── 3.json ├── d.js └── d.json ├── extensions.js ├── filter.js ├── index.js ├── mapKey.js ├── mapValue.js ├── noCache.js ├── noCache ├── a.js └── b.json ├── recurse.js ├── recurse ├── a.js ├── b │ ├── 1 │ │ ├── bar.json │ │ └── foo.js │ └── 2 │ │ └── baz.txt ├── c │ └── 3.json └── node_modules │ └── fake.js ├── simple.js └── simple ├── a.js ├── b.json ├── c.coffee ├── d.txt ├── e.ts └── f.d.ts /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aseemk/requireDir/HEAD/.gitignore -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aseemk/requireDir/HEAD/.travis.yml -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aseemk/requireDir/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aseemk/requireDir/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aseemk/requireDir/HEAD/README.md -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aseemk/requireDir/HEAD/index.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aseemk/requireDir/HEAD/package.json -------------------------------------------------------------------------------- /test/camelcase/a_main.js: -------------------------------------------------------------------------------- 1 | module.exports = 'a main'; 2 | -------------------------------------------------------------------------------- /test/camelcase/sub-dir/a-sub.js: -------------------------------------------------------------------------------- 1 | module.exports = 'a sub'; 2 | -------------------------------------------------------------------------------- /test/duplicates.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aseemk/requireDir/HEAD/test/duplicates.js -------------------------------------------------------------------------------- /test/duplicates/a.js: -------------------------------------------------------------------------------- 1 | module.exports = 'a.js'; 2 | -------------------------------------------------------------------------------- /test/duplicates/b.json: -------------------------------------------------------------------------------- 1 | "b.json" 2 | -------------------------------------------------------------------------------- /test/duplicates/b/1.js: -------------------------------------------------------------------------------- 1 | module.exports = '1.js'; 2 | -------------------------------------------------------------------------------- /test/duplicates/b/1.txt: -------------------------------------------------------------------------------- 1 | '1.txt' 2 | -------------------------------------------------------------------------------- /test/duplicates/b/2.js: -------------------------------------------------------------------------------- 1 | module.exports = '2.js'; 2 | -------------------------------------------------------------------------------- /test/duplicates/b/2.json: -------------------------------------------------------------------------------- 1 | "2.json" 2 | -------------------------------------------------------------------------------- /test/duplicates/c.txt: -------------------------------------------------------------------------------- 1 | 'c.txt' 2 | -------------------------------------------------------------------------------- /test/duplicates/c/3.json: -------------------------------------------------------------------------------- 1 | "3.json" 2 | -------------------------------------------------------------------------------- /test/duplicates/d.js: -------------------------------------------------------------------------------- 1 | module.exports = 'd.js'; 2 | -------------------------------------------------------------------------------- /test/duplicates/d.json: -------------------------------------------------------------------------------- 1 | "d.json" 2 | -------------------------------------------------------------------------------- /test/extensions.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aseemk/requireDir/HEAD/test/extensions.js -------------------------------------------------------------------------------- /test/filter.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aseemk/requireDir/HEAD/test/filter.js -------------------------------------------------------------------------------- /test/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aseemk/requireDir/HEAD/test/index.js -------------------------------------------------------------------------------- /test/mapKey.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aseemk/requireDir/HEAD/test/mapKey.js -------------------------------------------------------------------------------- /test/mapValue.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aseemk/requireDir/HEAD/test/mapValue.js -------------------------------------------------------------------------------- /test/noCache.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aseemk/requireDir/HEAD/test/noCache.js -------------------------------------------------------------------------------- /test/noCache/a.js: -------------------------------------------------------------------------------- 1 | module.exports = 'a'; -------------------------------------------------------------------------------- /test/noCache/b.json: -------------------------------------------------------------------------------- 1 | "b" 2 | -------------------------------------------------------------------------------- /test/recurse.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aseemk/requireDir/HEAD/test/recurse.js -------------------------------------------------------------------------------- /test/recurse/a.js: -------------------------------------------------------------------------------- 1 | module.exports = 'a'; 2 | -------------------------------------------------------------------------------- /test/recurse/b/1/bar.json: -------------------------------------------------------------------------------- 1 | "bar" 2 | -------------------------------------------------------------------------------- /test/recurse/b/1/foo.js: -------------------------------------------------------------------------------- 1 | module.exports = 'foo'; 2 | -------------------------------------------------------------------------------- /test/recurse/b/2/baz.txt: -------------------------------------------------------------------------------- 1 | baz 2 | -------------------------------------------------------------------------------- /test/recurse/c/3.json: -------------------------------------------------------------------------------- 1 | 3 2 | -------------------------------------------------------------------------------- /test/recurse/node_modules/fake.js: -------------------------------------------------------------------------------- 1 | module.exports = 'fake'; 2 | -------------------------------------------------------------------------------- /test/simple.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aseemk/requireDir/HEAD/test/simple.js -------------------------------------------------------------------------------- /test/simple/a.js: -------------------------------------------------------------------------------- 1 | module.exports = 'a'; 2 | -------------------------------------------------------------------------------- /test/simple/b.json: -------------------------------------------------------------------------------- 1 | "b" 2 | -------------------------------------------------------------------------------- /test/simple/c.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 'c' 2 | -------------------------------------------------------------------------------- /test/simple/d.txt: -------------------------------------------------------------------------------- 1 | d 2 | -------------------------------------------------------------------------------- /test/simple/e.ts: -------------------------------------------------------------------------------- 1 | export = 'e'; 2 | -------------------------------------------------------------------------------- /test/simple/f.d.ts: -------------------------------------------------------------------------------- 1 | export const foo: 'bar'; 2 | --------------------------------------------------------------------------------