-define(['libs/jquery', 'libs/underscore'], function($, _) {
+define(['libs/jquery', 'libs/underscore', 'fnpjs/logging/logging'], function($, _, logging) {
'use strict';
}
var bootstrappedData = {},
- options = {},
moduleInstances = {},
eventListeners = [],
- plugins = [];
+ plugins = [],
+ config;
_.each(_.keys(modules || {}), function(moduleName) {
if(_.contains(app.permissions[moduleName] || [], 'handleEvents')) {
} : undefined;
this.getDOM = _.contains(permissions, 'getDOM') ? function() {
- return $(options.rootSelector);
+ return $(config.rootSelector);
} : undefined;
this.getPlugins = function() {
return plugins;
};
+
+ this.getConfig = function() {
+ return config;
+ };
};
plugins.push(plugin);
};
- this.start = function(_options) {
- options = _.extend({
+ this.start = function(_config) {
+ config = _.extend({
rootSelector: 'body'
- }, _options);
+ }, _config);
+
+
+ if(config.logging) {
+ logging.setConfig(config.logging);
+ }
+
app.initModules.forEach(function(moduleName) {
getModuleInstance(moduleName).start();
});