src/plugin/bundle.js
function (_main, _modules, _modules_options) {
        if (typeof _main === "object") {
            _modules_options = _modules;
            _modules = _main;
        }

        for (var moduleName in _modules) {
            // if already initialized - skip
            if (moduleName in sb.modules) {
                continue;
            }

            // declare new modules
            sb.modules[moduleName] = _modules[moduleName];
            sb.initialized[moduleName] = 0;

            // declare module options
            if (_modules_options && moduleName in _modules_options) {
                sb.modules_options[moduleName] = _modules_options[moduleName];
            }
        }

        if (typeof _main === "function") {
            var output = {'exports': {}};
            _main(sb.trigger('lmd-register:decorate-require', "<bundle:main>", sb.require)[1], output.exports, output);
        }
    }
function (_main, _modules, _modules_options) {
        if (typeof _main === "object") {
            _modules_options = _modules;
            _modules = _main;
        }

        for (var moduleName in _modules) {
            // if already initialized - skip
            if (moduleName in sb.modules) {
                continue;
            }

            // declare new modules
            sb.modules[moduleName] = _modules[moduleName];
            sb.initialized[moduleName] = 0;

            // declare module options
            if (_modules_options && moduleName in _modules_options) {
                sb.modules_options[moduleName] = _modules_options[moduleName];
            }
        }

        if (typeof _main === "function") {
            var output = {'exports': {}};
            _main(sb.trigger('lmd-register:decorate-require', "<bundle:main>", sb.require)[1], output.exports, output);
        }
    }
Cases:
({main}, {modules}, {options})
({modules}, {options})
({modules})

@param {Function} _main
@param {Object}   _modules
@param {Object}   _modules_options