-
Notifications
You must be signed in to change notification settings - Fork 3
/
run.bat
50 lines (41 loc) · 1.15 KB
/
run.bat
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
@echo off
echo ======================================================
echo = node version is :
CALL node -v
if not "%errorlevel%" == "0" (
echo "[ERROR] node.js not found!"
echo "[ERROR] please install node.js first!"
EXIT 1
)
echo ======================================================
echo = check command typescript
echo = typescript version is :
call tsc -v 2>nul
if not "%errorlevel%" == "0" (
echo = typescript not found! run install last version of typescript...
call :ECHO_SPEED_UP_HELP
call npm install -g typescript
echo = typescript version is :
call tsc -v
)
if not EXIST node_modules (
echo = package.json not init! run npm install...
call :ECHO_SPEED_UP_HELP
CALL npm install
)
if not "%1" == "0" (
echo ======================================================
echo = tsc compile
call tsc -p .\tsconfig.json
echo ======================================================
echo = execute build config files
call node ./bin/index.js
pause
)
GOTO :EOF
:ECHO_SPEED_UP_HELP
echo =
echo = If you want to speed up download time in china area.
echo = use this command below:
echo = npm config set registry https://registry.npm.taobao.org
GOTO :EOF