jcinfo-utils 1.0.42 → 1.0.43
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/package.json +1 -1
- package/src/updateDotEnv.js +3 -2
package/package.json
CHANGED
package/src/updateDotEnv.js
CHANGED
|
@@ -63,6 +63,7 @@ export function _updateDotEnv(fs, incrementBuild = false, filename = '.env') {
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
const envProd = '.env.production.local'
|
|
66
|
+
const envLocal = '.env.local'
|
|
66
67
|
const envKey = 'VITE_VERSION'
|
|
67
68
|
|
|
68
69
|
export function updateDotEnvKey(
|
|
@@ -104,7 +105,7 @@ export function updateDotEnvKey(
|
|
|
104
105
|
if (vkey == key) {
|
|
105
106
|
let version = generateValue(vvalue)
|
|
106
107
|
line = `${key}=${version}`
|
|
107
|
-
console.log('* Update KEY:',
|
|
108
|
+
console.log('* Update KEY:', key, '=', version, '=>', filename)
|
|
108
109
|
}
|
|
109
110
|
return line
|
|
110
111
|
})
|
|
@@ -125,5 +126,5 @@ export function updateVersionBuild(fs, autoInc = false) {
|
|
|
125
126
|
|
|
126
127
|
export function updateDotEnv(fs, autoInc = false, command = 'build') {
|
|
127
128
|
command == 'build' && updateDotEnvKey(fs, autoInc, envKey, envProd, false)
|
|
128
|
-
command == 'serve' && updateDotEnvKey(fs, autoInc, envKey,
|
|
129
|
+
command == 'serve' && updateDotEnvKey(fs, autoInc, envKey, envLocal, false)
|
|
129
130
|
}
|