Daniel@0: "use strict"; Daniel@0: Daniel@0: App.module("MainRegionModule", function(MainRegionModule, App, Backbone, Marionette, $, _, Logger) { Daniel@0: Daniel@0: // Prevent auto start Daniel@0: MainRegionModule.startWithParent = false; Daniel@0: Daniel@0: // Define options Daniel@0: var defaultModuleOptions = { Daniel@0: }; Daniel@0: Daniel@0: // Initialization checker Daniel@0: var assertModuleIsInitialized = function() { Daniel@0: if (!logger) { Daniel@0: throw "MainRegionModule has not been initialized"; Daniel@0: } Daniel@0: }; Daniel@0: Daniel@0: /** Daniel@0: * Module initializer Daniel@0: */ Daniel@0: MainRegionModule.addInitializer(function(options){ Daniel@0: Daniel@0: MainRegionModule.moduleOptions = _.extend(defaultModuleOptions, options); Daniel@0: Daniel@0: MainRegionModule.logger = Logger.get("MainRegionModule"); Daniel@0: MainRegionModule.logger.setLevel(Logger.DEBUG); Daniel@0: }); Daniel@0: }, Logger);