A library to load all files as modules based on glob syntax.
A node.js library to find and load files as modules based on glob file syntax (i.e. 'plugins/**/*.js').
var loader = ;// a single path with a single callback once all modules are loadedloader;// multiple paths and a callback that should be called for each module loadedloader;
glob-module-loader can be easily installed using npm.
npm install glob-module-loader
Then simply require glob-module-loader in your application
glob-module-loader is intended to find all files matching a glob syntax (i.e. "plugins/**/*.js") and load each file as an individual module. It can load all modules synchronously and hand back an array, or it can load them asynchronously calling a callback method for each module loaded.
var loader = ;// load synchronouslyloader;// load asynchronouslyloader;
glob-module-loader depends on the following packages:
Searches the file system for modules to load based on the glob patterns provided. Once all modules have been loaded the callback function is called passing the loaded modules as an array.