1.0.0 • Published 9 years ago
@nhz.io/autoindex v1.0.0
Install
npm i -S @nhz.io/autoindexUsage
const ai = require('@nhz.io/autoindex')
module.exports = ai(__dirname, glob, loader)
...Example
/** +-+
* +- index.js
* +- a.js
* +- b.js
*/
// File: index.js
const ai = require('@nhz.io/autoindex')
module.exports = ai(__dirname) // a.js and b.js are autorequired and exportedNotes
globandloaderare optional- Default
globis:*.+(js|json) - Default loader will skip
index.*files - Custom
loaderwill receive the path of the matching module as a first argument
License
MIT
1.0.0
9 years ago