Package Exports
- requireindex
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (requireindex) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Description
Write minimal node index.js/index.coffee files that require and export all their siblings by file basename
Installation
npm install requireindexUsage
Check the test directory for example usage. The directory tree looks like:
-lib/
-index.js
-Foo.js
-bar/
index.js
f.js
fing.js
-bam.jsThe index.js files look like this:
module.exports = require('requireindex')(__dirname)and the result of
require('lib')is this:
{
bam: {
m: [Function]
},
bar: {
f: [Function],
fing: [Function]
},
Foo: {
l: [Function],
ls: [Function]
}
}