mirror of
https://github.com/Unitech/pm2.git
synced 2025-12-08 20:35:53 +00:00
28 lines
969 B
Plaintext
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;
|
|
// }
|