From 5ae583d58354ea8caebcdee3ec2c4613e0983591 Mon Sep 17 00:00:00 2001 From: Luk Lu Date: Sun, 12 Sep 2021 09:55:14 +0800 Subject: [PATCH] remove getDynamicConfig (migrate to sol.enviconfig) --- index.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/index.js b/index.js index d9684af..3fec000 100644 --- a/index.js +++ b/index.js @@ -28,16 +28,6 @@ module.exports = { return JSON.stringify(newEntity) }, - getDynamicConfig(dynamicConfigFile='ConfigDynamic.js') { // dynamicConfigFile should be absolute or relative to the node process's dir. - const fullpath = path.join(process.cwd(), dynamicConfigFile) - if (fs.existsSync(fullpath)) { - delete require.cache[require.resolve(fullpath)] // delete require.cache[fullpath] 不起作用 - return require(fullpath) - } else { - return {} - } - }, - name2port(name='') { let port = name.toLowerCase() .replace(/[abc]/g, 2)