Package Exports
- index-modules
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 (index-modules) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
index-modules 
Generate an index of all modules in a directory.
Install
Installation of the npm package:
> npm install --save index-modules
Usage
Generate an index for a directory:
> index-modules directory/
index generated directory/index.js
Generate indexes for all directory containing a .index-modules
file:
> index-modules --auto root/
index generated root/index.js
index generated root/directory/index.js
Using an index:
import modules from "./modules";
modules.foo; // default export of the foo module
modules.bar; // default export of the bar module
import * as modules_ from "./modules";
modules_.foo.baz; // baz export of the foo module
Lazy index (CommonJS)
Only requires sub-modules when necessary.
> index-modules --cjs-lazy directory/
index generated directory/index.js
Contributions
Contributions are very welcomed, either on the documentation or on the code.
You may:
- report any issue you've encountered;
- fork and create a pull request.
License
ISC © Julien Fontanet