-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlaunch.bat
55 lines (48 loc) · 894 Bytes
/
launch.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
51
52
53
54
@echo off
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
set SHOULD_START=1
if "%2"=="-n" (
set SHOULD_START=0
) else if "%2"=="--no-start" (
set SHOULD_START=0
)
if "%1"=="-t" (
set testing="25"
) else if "%1"=="--test" (
set testing="25"
)
if "%1"=="--build" (
goto :build
) else if "%1"=="-b" (
goto :build
) else (
goto :start
)
if not !ERRORLEVEL!==0 (
echo An error occurred while starting application
goto :END
)
:build
call yarn build
REM && tsc -p "./build"
if not !ERRORLEVEL!==0 (
echo An error occurred while building application
goto :END
)
RD /S /Q "./build/src"
if "%SHOULD_START%"=="1" (
goto :start
)
goto :END
:start
REM start /B C:/nw.js/nw "./build"
call npm start
goto :END
:END
if not !ERRORLEVEL!==0 (
echo An error occurred while starting application
goto :EOF
) else (
echo Application start was a success!
)
goto :EOF