const chalk = require('chalk'); const fs = require('fs'); const path = require('path'); const module_loader = require('./src/module_loader'); const figures = require('figures'); module.exports.start = function(system) { system.modules = []; system.log = function(text){ console.log(text); } system.logUpdate = function(text){ if (process.stdout.isTTY) { process.stdout.clearLine(0); process.stdout.cursorTo(0); process.stdout.write(text + '\r'); } } system.logSymbols = figures; system.log(`Starting the ${chalk.bold('Modular Web System')}`); system.chalk = chalk; system.module_loader = module_loader; system.module_loader.load_all(system); }