UNPKG

auto-plug

Version:

Auto-require plugin packages by prefix. (for i.e. Gulp, Grunt or other heavy plugin-dependent packages)

21 lines (17 loc) 446 B
'use strict'; var AutoPlug = require('./lib/auto-plug.js'); /** * export main function * @param {mixed} options custom options object or options.prefix string * @return {Object} object containing requires */ module.exports = function(options) { var autoPlug = new AutoPlug(options); autoPlug.plug(); return autoPlug.getContainer(); }; /** * export AutoPlug * @type {class} */ module.exports.AutoPlug = AutoPlug;