-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
·45 lines (37 loc) · 1.04 KB
/
deploy.sh
File metadata and controls
executable file
·45 lines (37 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
echo "🚀 開始建置 Threads AI 智慧回覆助手..."
# 檢查 Node.js 是否安裝
if ! command -v node &> /dev/null; then
echo "❌ 錯誤: 未找到 Node.js,請先安裝 Node.js"
exit 1
fi
# 檢查 npm 是否安裝
if ! command -v npm &> /dev/null; then
echo "❌ 錯誤: 未找到 npm,請先安裝 npm"
exit 1
fi
echo "📦 安裝依賴..."
npm install
if [ $? -ne 0 ]; then
echo "❌ 依賴安裝失敗"
exit 1
fi
echo "🔨 建置專案..."
npm run build
if [ $? -ne 0 ]; then
echo "❌ 建置失敗"
exit 1
fi
echo "✅ 建置成功!"
echo ""
echo "📁 擴充功能位於: $(pwd)/dist"
echo ""
echo "📖 安裝說明:"
echo "1. 開啟 Chrome 瀏覽器"
echo "2. 前往 chrome://extensions/"
echo "3. 開啟右上角的「開發人員模式」"
echo "4. 點擊「載入未封裝項目」"
echo "5. 選擇 $(pwd)/dist 資料夾"
echo ""
echo "🎉 安裝完成後,請前往設定頁面輸入您的 Google Gemini API Key"
echo "🔗 獲取 API Key: https://makersuite.google.com/app/apikey"