mali-ui-plus 1.1.6 → 1.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/env/index.js CHANGED
@@ -82,7 +82,7 @@ function getSCSSAdditionalData (conf) {
82
82
  return rest.join('\n')
83
83
  }
84
84
 
85
- function parseEnv (dirPath) {
85
+ function parseEnv (rootPath) {
86
86
  const envConfig = {}
87
87
  envConfig.VUE_APP_MODE = process.env.VUE_APP_MODE || 'prod'
88
88
  envConfig.VUE_APP_CUSTOM_MODULE = process.env.VUE_APP_CUSTOM_MODULE || 'default'
@@ -90,18 +90,22 @@ function parseEnv (dirPath) {
90
90
  envConfig.VUE_APP_PLATFORM_NAME = process.env.VUE_APP_PLATFORM_NAME || 'default'
91
91
  envConfig.VUE_APP_PUBLISH_DATE = XEUtils.toDateString(new Date(), 'yyyyMMddHHmmss')
92
92
 
93
- const cusName = `.env.${envConfig.VUE_APP_CUSTOM_MODULE || 'default'}`
94
- const envName = `${cusName}.${envConfig.VUE_APP_SUB_MODULE || 'default'}.${envConfig.VUE_APP_PLATFORM_NAME || 'default'}.${getEnvCode(envConfig.VUE_APP_MODE)}`
95
- const globalDev = parseEnvFile(dirPath, '.env')
96
- const defDev = parseEnvFile(dirPath, cusName)
97
- const appEnv = parseEnvFile(dirPath, envName)
98
- const localEnv = parseEnvFile(dirPath, `${envName}.local`)
99
-
100
- return Object.assign({}, globalDev, defDev, appEnv, localEnv, envConfig)
93
+ const cName = `.env.${envConfig.VUE_APP_CUSTOM_MODULE}`
94
+ const csName = `${cName}.${envConfig.VUE_APP_SUB_MODULE}`
95
+ const cspName = `${csName}.${envConfig.VUE_APP_PLATFORM_NAME}`
96
+ const envName = `${cspName}.${getEnvCode(envConfig.VUE_APP_MODE)}`
97
+ const globalDev = parseEnvFile(rootPath, '.env')
98
+ const cEnv = parseEnvFile(rootPath, cName)
99
+ const csEnv = parseEnvFile(rootPath, csName)
100
+ const cspEnv = parseEnvFile(rootPath, cspName)
101
+ const envEnv = parseEnvFile(rootPath, envName)
102
+ const localEnv = parseEnvFile(rootPath, `${envName}.local`)
103
+
104
+ return Object.assign({}, globalDev, cEnv, csEnv, cspEnv, envEnv, localEnv, envConfig)
101
105
  }
102
106
 
103
- function initEnv (dirPath, defaultEnv) {
104
- const envConfig = parseEnv(dirPath)
107
+ function initEnv (rootPath, defaultEnv) {
108
+ const envConfig = parseEnv(rootPath)
105
109
  const conf = Object.assign(process.env, defaultEnv, envConfig)
106
110
  console.log('\n环境配置:')
107
111
  console.log(`版本:${conf.VUE_APP_CUSTOM_MODULE}\n模块:${conf.VUE_APP_SUB_MODULE}\n平台:${conf.VUE_APP_PLATFORM_NAME}\n环境:${conf.VUE_APP_MODE}\n`)
@@ -61781,7 +61781,7 @@ function index_config(options) {
61781
61781
  return config_0;
61782
61782
  }
61783
61783
  const MaliUI = {
61784
- version: "1.1.5",
61784
+ version: "1.1.6",
61785
61785
  install: index_install,
61786
61786
  config: index_config,
61787
61787
  renderer: {
@@ -61791,7 +61791,7 @@ function index_config(options) {
61791
61791
  return config_0;
61792
61792
  }
61793
61793
  const MaliUI = {
61794
- version: "1.1.5",
61794
+ version: "1.1.6",
61795
61795
  install: index_install,
61796
61796
  config: index_config,
61797
61797
  renderer: {