1@if "%DEBUG%" == "" @echo off 2@rem ########################################################################## 3@rem 4@rem Hvigor startup script for Windows 5@rem 6@rem ########################################################################## 7 8@rem Set local scope for the variables with windows NT shell 9if "%OS%"=="Windows_NT" setlocal 10 11set DIRNAME=%~dp0 12if "%DIRNAME%" == "" set DIRNAME=. 13set APP_BASE_NAME=%~n0 14set APP_HOME=%DIRNAME% 15 16@rem Resolve any "." and ".." in APP_HOME to make it shorter. 17for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 18 19set WRAPPER_MODULE_PATH=%APP_HOME%\hvigor\hvigor-wrapper.js 20set NODE_EXE=node.exe 21 22goto start 23 24:start 25if not defined NODE_OPTS set NODE_OPTS="--" 26 27@rem Find node.exe 28if defined NODE_HOME goto findNodeFromNodeHome 29 30%NODE_EXE% --version >NUL 2>&1 31if "%ERRORLEVEL%" == "0" goto execute 32 33echo. 34echo ERROR: NODE_HOME is not set and no 'node' command could be found in your PATH. 35echo. 36echo Please set the NODE_HOME variable in your environment to match the 37echo location of your NodeJs installation. 38 39goto fail 40 41:findNodeFromNodeHome 42set NODE_HOME=%NODE_HOME:"=% 43set NODE_EXE_PATH=%NODE_HOME%/%NODE_EXE% 44 45if exist "%NODE_EXE_PATH%" goto execute 46echo. 47echo ERROR: NODE_HOME is not set and no 'node' command could be found in your PATH. 48echo. 49echo Please set the NODE_HOME variable in your environment to match the 50echo location of your NodeJs installation. 51 52goto fail 53 54:execute 55@rem Execute hvigor 56"%NODE_EXE%" %WRAPPER_MODULE_PATH% %* 57 58if "%ERRORLEVEL%" == "0" goto hvigorwEnd 59 60:fail 61exit /b 1 62 63:hvigorwEnd 64if "%OS%" == "Windows_NT" endlocal 65 66:end 67