-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.bat
More file actions
60 lines (54 loc) · 1.26 KB
/
build.bat
File metadata and controls
60 lines (54 loc) · 1.26 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
@echo off
chcp 65001 >nul 2>&1
setlocal EnableExtensions
cd /d "%~dp0"
echo ========================================
echo AINav 构建脚本
echo ========================================
echo.
:: 检查 Node.js
where node >nul 2>&1
if errorlevel 1 (
echo [ERROR] 未检测到 Node.js,请先安装: https://nodejs.org
pause
exit /b 1
)
echo [1/3] 构建 index.html ...
node build-html-data.js
if errorlevel 1 (
echo [ERROR] 构建失败!
pause
exit /b 1
)
echo 完成。
echo [2/3] 构建国际化英文版 ...
if exist build-i18n-en.cjs (
node build-i18n-en.cjs
if errorlevel 1 (
echo [WARN] 国际化构建失败,已跳过。
) else (
echo 完成。
)
) else (
echo 跳过(build-i18n-en.cjs 不存在)。
)
echo [3/3] 下载图标 ...
if exist download-icons.mjs (
node download-icons.mjs
if errorlevel 1 (
echo [WARN] 图标下载失败,已跳过。
) else (
echo 完成。
)
) else (
echo 跳过(download-icons.mjs 不存在)。
)
echo.
echo ========================================
echo 构建完成!
echo ========================================
echo.
echo 输出: index.html
if exist index-en.html echo index-en.html
echo.
pause