This commit is contained in:
Sirius
2026-08-05 15:36:36 +08:00
commit 39d1d8de6c
19 changed files with 2495 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
#!/usr/bin/env bash
set -euo pipefail
project_dir=$(cd "$(dirname "$0")/.." && pwd)
cd "$project_dir"
if ! command -v node >/dev/null 2>&1; then
echo "需要 Node.js 22 或更高版本。" >&2
exit 1
fi
node_major=$(node -p 'Number(process.versions.node.split(".")[0])')
if [ "$node_major" -lt 22 ]; then
echo "当前 Node.js 版本过低:$(node --version),需要 22 或更高版本。" >&2
exit 1
fi
if ! command -v command-code >/dev/null 2>&1; then
npm install --global command-code@latest
fi
npm install
npm run build
echo "安装完成。"
echo "如未登录,请运行:command-code login"
echo "登录状态:command-code status --json"