/* global Module, Log, MM, config */

/* Magic Mirror
 * Module: Manager Module
 *
 * By Rodrigo Ramìrez Norambuena https://rodrigoramirez.com
 * MIT Licensed.
 */

Module.register("MagicMirror-Module-Manager", {

	// Set the minimum MagicMirror module version.
	requiresVersion: "2.1.0",

	// Default module config.
	defaults: {
		baseUrlApi: 'http://beta.magicmirror.builders/api',
		limit: 20
	},

	// Define start sequence.
	start: function() {
		Log.info("Starting module: " + this.name);
	},

	getStyles: function() {
		return ["module-manager.css"];
	},

});

@@ -555,12 +555,228 @@
 %5D;%0A%09%7D,%0A%0A
+%09getModule: function(name) %7B%0A%09%09return MM.getModules().withClass(name)%5B0%5D;%0A%09%7D,%0A%0A%09getConfigModule: function(name) %7B%0A%09%09return this.getModule(name).config;%0A%09%7D,%0A%0A%09getAllModules: function() %7B%0A%09%09return MM.getModules();%0A%09%7D%0A%0A
 %7D);%0A

Add functions for get modules and configs