Files
websopy-taro/scripts/safe-build-weapp.sh
T
gxwebsoft d83a6bdd69 refactor(official): 使用演示数据兜底官网内容展示
- 在关于我们页补充企业优势和联系方式演示数据展示
- 资讯列表页增加分类标签,实现按分类筛选资讯
- 文章详情页新增相关推荐文章展示逻辑
- 主页使用演示数据兜底导航、Banner、核心业务、公司简介和文章列表
- 各页面均优化站点信息使用,优先展示真实数据,缺失时使用演示数据
- 留言页增加公司联系信息展示,提升体验
- 个人中心页支持分享官网,展示演示数据防止空白
- 主页Banner支持无图时使用渐变背景和文字占位
- 统一使用演示数据,保证页面无空白,提升整体稳定性和用户体验
2026-08-12 19:17:47 +08:00

17 lines
519 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# 安全构建小程序:规避 Taro emptyOutputDir 触发的 SAFE_DELETE 批量删除守卫
# dist 文件数 > 50 时守卫会中断构建,导致 official/index 等页面 .js 缺失而白屏)
set -e
BAK_ROOT="/tmp/taro-dist-bak"
if [ -d dist ]; then
mkdir -p "$BAK_ROOT"
BAK="$BAK_ROOT/dist-$(date +%s)"
mv dist "$BAK"
echo "[safe-build] 已备份旧 dist -> $BAK"
fi
echo "[safe-build] 开始构建 weapp ..."
./node_modules/.bin/taro build --type weapp
echo "[safe-build] 构建完成"