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 +15 -11
- package/lib/mali-ui-plus.common.js +1 -1
- package/lib/mali-ui-plus.umd.js +1 -1
- package/lib/mali-ui-plus.umd.min.js +1 -1
- package/package.json +1 -1
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 (
|
|
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
|
|
94
|
-
const
|
|
95
|
-
const
|
|
96
|
-
const
|
|
97
|
-
const
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
|
|
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 (
|
|
104
|
-
const envConfig = parseEnv(
|
|
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.
|
|
61784
|
+
version: "1.1.6",
|
|
61785
61785
|
install: index_install,
|
|
61786
61786
|
config: index_config,
|
|
61787
61787
|
renderer: {
|
package/lib/mali-ui-plus.umd.js
CHANGED
|
@@ -61791,7 +61791,7 @@ function index_config(options) {
|
|
|
61791
61791
|
return config_0;
|
|
61792
61792
|
}
|
|
61793
61793
|
const MaliUI = {
|
|
61794
|
-
version: "1.1.
|
|
61794
|
+
version: "1.1.6",
|
|
61795
61795
|
install: index_install,
|
|
61796
61796
|
config: index_config,
|
|
61797
61797
|
renderer: {
|