优化
This commit is contained in:
55
flutter-dev.sh
Executable file
55
flutter-dev.sh
Executable file
@@ -0,0 +1,55 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Sales Chat Flutter 开发脚本
|
||||
|
||||
set -e
|
||||
|
||||
cd "$(dirname "$0")/client/flutter"
|
||||
|
||||
case "$1" in
|
||||
"get")
|
||||
echo "📦 安装依赖..."
|
||||
flutter pub get
|
||||
;;
|
||||
"run")
|
||||
echo "🚀 启动应用..."
|
||||
flutter run
|
||||
;;
|
||||
"web")
|
||||
echo "🌐 启动 Web 版本..."
|
||||
flutter run -d chrome
|
||||
;;
|
||||
"android")
|
||||
echo "📱 构建 Android APK..."
|
||||
flutter build apk --release
|
||||
echo "✅ APK: build/app/outputs/flutter-apk/app-release.apk"
|
||||
;;
|
||||
"ios")
|
||||
echo "📱 构建 iOS..."
|
||||
flutter build ios --release
|
||||
echo "✅ 在 Xcode 中打开: ios/Runner.xcworkspace"
|
||||
;;
|
||||
"clean")
|
||||
echo "🧹 清理构建..."
|
||||
flutter clean
|
||||
flutter pub get
|
||||
;;
|
||||
"test")
|
||||
echo "🧪 运行测试..."
|
||||
flutter test
|
||||
;;
|
||||
*)
|
||||
echo "Sales Chat Flutter 开发工具"
|
||||
echo ""
|
||||
echo "用法: $0 <command>"
|
||||
echo ""
|
||||
echo "命令:"
|
||||
echo " get - 安装依赖"
|
||||
echo " run - 运行应用 (默认设备)"
|
||||
echo " web - 运行 Web 版本"
|
||||
echo " android - 构建 Android APK"
|
||||
echo " ios - 构建 iOS 应用"
|
||||
echo " clean - 清理构建缓存"
|
||||
echo " test - 运行测试"
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user