@taole/deploy-helper 0.7.1 → 0.7.2
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/lib/offlinePkg.mjs +4 -1
- package/package.json +1 -1
package/lib/offlinePkg.mjs
CHANGED
|
@@ -175,7 +175,7 @@ export function checkOfflinePkg(config) {
|
|
|
175
175
|
|
|
176
176
|
// 如果offlineConfig.remove为true,则不构建离线包
|
|
177
177
|
const willRemovePkg = offlineConfig && offlineConfig.name && offlineConfig.remove === true && offlineConfig.skip !== true;
|
|
178
|
-
const willSkip = !offlineConfig || !offlineConfig.name || offlineConfig.skip === true;
|
|
178
|
+
const willSkip = !offlineConfig || !offlineConfig.name || offlineConfig.skip === true || (offlineConfig.onlyTest === true && config.mode === "prod");
|
|
179
179
|
if (willRemovePkg) {
|
|
180
180
|
return {
|
|
181
181
|
canBuild: true,
|
|
@@ -222,6 +222,9 @@ export function checkOfflinePkg(config) {
|
|
|
222
222
|
errorMsg: ""
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
|
+
if (offlineConfig.onlyTest === true && config.mode === "prod") {
|
|
226
|
+
console.log(`离线包${offlineConfig.name}只用于测试环境, 跳过构建线上环境的离线包构建`);
|
|
227
|
+
}
|
|
225
228
|
return {
|
|
226
229
|
canBuild: true,
|
|
227
230
|
errorMsg: "",
|