forward-modules
v1.0.1
Published
This library automatically creates an exports map of all/some files in a directory
Downloads
2
Maintainers
Readme
Forward Modules
This library automatically creates an exports map of all/some files in a directory
Install
npm i --save forward-modules
Use
Inside any directory, just add your entry point file, you don't have to name it index.js
, you can also name it *.js
or all.js
.
And just add the following snippet:
module.exports = require('forward-modules')();
You can also exclude some modules:
module.exports = require('forward-modules')([
'ModuleA',
'ModuleB',
]);
this exposes all modules in the directory except ModuleA
, and ModuleB