jcinfo-utils 1.0.40 → 1.0.41
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 +1 -1
- package/package.json +1 -1
- package/src/updateDotEnv.js +6 -1
package/.env
CHANGED
package/package.json
CHANGED
package/src/updateDotEnv.js
CHANGED
|
@@ -42,7 +42,7 @@ function incrementBuildNumber(build, finalBuild) {
|
|
|
42
42
|
return finalBuild
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
export function
|
|
45
|
+
export function _updateDotEnv(fs, incrementBuild = false, filename = '.env') {
|
|
46
46
|
const keys = ['VITE_VERSION', 'REACT_APP_VERSION']
|
|
47
47
|
let content = getContentFileInArray(fs, filename)
|
|
48
48
|
content = content.map((line) => {
|
|
@@ -122,3 +122,8 @@ export function updateVersionDate(fs) {
|
|
|
122
122
|
export function updateVersionBuild(fs, autoInc = false) {
|
|
123
123
|
updateDotEnvKey(fs, autoInc, envKey, envProd, false)
|
|
124
124
|
}
|
|
125
|
+
|
|
126
|
+
export function updateDotEnv(fs, autoInc = false, command = 'build') {
|
|
127
|
+
command == 'build' && updateDotEnvKey(fs, autoInc, envKey, envProd, false)
|
|
128
|
+
command == 'serve' && updateDotEnvKey(fs, autoInc, envKey, '.env.local', false)
|
|
129
|
+
}
|