MCPcopy
hub / github.com/MagicMirrorOrg/MagicMirror / loadModules

Function loadModules

js/loader.js:257–274  ·  view source on GitHub ↗

* Load all modules as defined in the config.

()

Source from the content-addressed store, hash-verified

255 * Load all modules as defined in the config.
256 */
257 async loadModules () {
258 const moduleData = await getModuleData();
259 const envVars = await getEnvVars();
260 const customCss = envVars.customCss;
261
262 // Load all modules
263 for (const module of moduleData) {
264 await loadModule(module);
265 }
266
267 // Load custom.css
268 // Since this happens after loading the modules,
269 // it overwrites the default styles.
270 await loadFile(customCss);
271
272 // Start all modules.
273 await startModules();
274 },
275
276 /**
277 * Load a file (script or stylesheet).

Callers

nothing calls this directly

Calls 5

getModuleDataFunction · 0.85
loadFileFunction · 0.85
startModulesFunction · 0.85
getEnvVarsFunction · 0.70
loadModuleFunction · 0.70

Tested by

no test coverage detected