docs: 增加一键安装脚本并优化 ignore 配置

This commit is contained in:
TYt50
2026-01-28 15:00:37 +08:00
parent 9269b8af77
commit 03225746f6
2 changed files with 39 additions and 0 deletions

1
.gitignore vendored
View File

@@ -9,6 +9,7 @@ data/
# Exports (Contains sensitive information) # Exports (Contains sensitive information)
accounts_export.txt accounts_export.txt
export.js export.js
一键导出账号.bat
# OS files # OS files
.DS_Store .DS_Store

38
一键安装环境.bat Normal file
View File

@@ -0,0 +1,38 @@
@echo off
setlocal enabledelayedexpansion
echo ==========================================
echo 2FA 账号工具 - 一键环境安装
echo ==========================================
echo.
:: 检查 Node.js 是否安装
node -v >nul 2>&1
if %errorlevel% neq 0 (
echo [错误] 未检测到 Node.js 环境!
echo 请先安装 Node.js (建议 LTS 版本): https://nodejs.org/
pause
exit /b
)
echo [1/2] 正在清理旧的依赖缓存...
if exist node_modules (
rd /s /q node_modules
)
echo [2/2] 正在安装项目依赖...
call npm install
if %errorlevel% neq 0 (
echo.
echo [错误] 依赖安装失败,请检查网络连接。
pause
exit /b
)
echo.
echo ==========================================
echo 安装完成!现在可以运行 start.vbs 启动应用。
echo ==========================================
echo.
pause