Maybe I missed this in the documentation somewhere, but here. I have a main controller that deals with module management. So far I have about 20 modules, and I would like to be able to easily configure them to boot the kernel. This means that I have a large array or many calls. Is it an acceptable / good practice to create a list of modules in a literal object, and then the module loads its dependencies from this? Here is an example of what I mean:
config.js
modules = [
'moduleA',
'moduleB',
'moduleC'
];
core.js
define(
['config'],
function(config) {
return {
startAll : function() {
console.log('starting all modules.');
}
}
};
}
);
I'm not sure if this is such a good idea as I am new to RequireJS, but I like the idea of setting up which modules load from one place. In my case, modulo, I mean the user interface widgets that I wrote more specifically.