1.1.2 • Published 6 years ago
autodiscover-modules v1.1.2
Usage
import path from 'path';
import autodiscover 'autodiscover-modules';
const folder = path.join(__dirname, 'modules');
autodiscover(
folder,
{ handler: 'function', name: 'string' }
).then((modules) => {
// do something
});
The library will give you all the modules in the modules/
directory that
matches the following export signature:
{
name: string,
handler: function
}