28 lines
969 B
Plaintext

// if user want to install module from ecosystem.config.js file
// it can also be a custom json file's name
// ???
// if (!moduleName || moduleName.length === 0 || moduleName.indexOf('.json') > 0) {
// var file = moduleName || cst.APP_CONF_DEFAULT_FILE;
// var isAbsolute = require('../../tools/IsAbsolute.js')(file);
// var filePath = isAbsolute ? file : path.join(CLI.cwd, file);
// try {
// var data = fs.readFileSync(filePath);
// } catch (e) {
// Common.printError(cst.PREFIX_MSG_ERR + 'File ' + file + ' not found');
// return cb(Common.retErr(e));
// }
// try {
// var config = Common.parseConfig(data, file);
// } catch (e) {
// Common.printError(cst.PREFIX_MSG_ERR + 'File ' + file + ' malformated');
// console.error(e);
// return cb(Common.retErr(e));
// }
// Modularizer.installMultipleModules(config.dependencies, cb, config.post_install);
// return;
// }