Skip to content
Snippets Groups Projects
Commit 7690fe4b authored by Frankly George's avatar Frankly George Committed by Pregmodder
Browse files

Tooling update

parent c487a784
No related branches found
No related tags found
1 merge request!12255Tooling update
......@@ -28,11 +28,10 @@ IF DEFINED git (
)
:: Otherwise prompt the user
ECHO This project has some optional dependencies that enable features that we believe will make the development process easier and more fruitful.
ECHO You are seeing this because some or all of these dependencies are missing.
ECHO If you wish to no longer see this, please use the simple compiler. 'simple-compiler.bat'
ECHO This project has some optional dependencies that enable extra features that we believe will be helpful to our users and developers.
ECHO You are seeing this because the feature you are trying to use requires dependencies that are missing.
ECHO.
ECHO Here is a list of the packages that are missing:
ECHO Here is a list of the dependencies that are missing:
IF NOT DEFINED git CALL :gitMessage
......@@ -74,6 +73,7 @@ GOTO :eof
:nodeMessage
ECHO Node.js, https://nodejs.org/, enables all of the new sanity checks and the advanced compiler.
ECHO Allows for things like:
ECHO Serving FC using 'serve.bat'
ECHO Source maps for easier debugging: https://dzone.com/articles/what-are-source-maps-and-how-to-properly-use-them
ECHO JavaScript linting to catch bugs early using ESLint: https://eslint.org/
ECHO JavaScript type checking to catch bugs early using the Typescript compiler: https://www.typescriptlang.org/
......@@ -90,7 +90,7 @@ GOTO :eof
:: if node_modules doesn't exist
IF NOT EXIST node_modules (
ECHO.
ECHO All optional dependencies for the advance compiler are installed, but the Node modules are not installed.
ECHO All optional dependencies are installed, but the Node modules are not installed.
ECHO.
ECHO These packages should take up less than 500MB of disk space. ~150 MB at time of writing.
ECHO They will be stored in the 'node_modules' directory inside of the project directory.
......
......@@ -17,7 +17,7 @@ function modulesCheck() {
if [[ ! -d node_modules ]]; then
# ask user if we can install modules
echo ""
echo "All optional dependencies for the advance compiler are installed, but the Node modules are not installed."
echo "All optional dependencies are installed, but the Node modules are not installed."
echo ""
echo "These packages should take up less than 500MB of disk space. (~150 MB at time of writing)."
echo "They will be stored in the 'node_modules' directory inside of the project directory."
......@@ -141,11 +141,10 @@ if [[ "$git" && "$node" ]]; then
fi
# Otherwise prompt the user
echo "This project has some optional dependencies that enable features that we believe will make the development process easier and more fruitful."
echo "You are seeing this because some or all of these dependencies are missing."
echo "If you wish to no longer see this, please use the simple compiler. 'simple-compiler.sh'"
echo "This project has some optional dependencies that enable extra features that we believe will be helpful to our users and developers."
echo "You are seeing this because the feature you are trying to use requires dependencies that are missing."
echo ""
echo "Here is a list of the packages that are missing:"
echo "Here is a list of the dependencies that are missing:"
if [[ ! "$git" ]]; then
echo " git, https://git-scm.com/, needed to interact with the .git folder in this project."
......@@ -157,6 +156,7 @@ fi
if [[ ! "$node" ]]; then
echo " Node.js, https://nodejs.org/, enables all of the new sanity checks and the advanced compiler."
echo " Allows for things like:"
echo " Serving FC using 'serve.sh'"
echo " Source maps for easier debugging: https://dzone.com/articles/what-are-source-maps-and-how-to-properly-use-them"
echo " JavaScript linting to catch bugs early using ESLint: https://eslint.org/"
echo " JavaScript type checking to catch bugs early using the Typescript compiler: https://www.typescriptlang.org/"
......
......@@ -5,24 +5,25 @@
pushd %~dp0
SET BASEDIR=%~dp0
:: check for node
where /q node
IF ERRORLEVEL 1 (
ECHO Node is required to run this http server.
exit /b 0
)
:: run dependencyCheck.bat
CALL .\devTools\scripts\dependencyCheck.bat
SET CODE=%ERRORLEVEL%
:: if the node_modules directory doesn't exist
IF NOT EXIST .\node_modules\ (
ECHO Node available, but the required Node modules are not installed.
CHOICE /C YN /N /M "Would you like us to run 'npm install' to install Node modules, using ~120 MB of disk space [Y/N]?"
IF !errorlevel!==1 (
ECHO Installing Node modules...
CALL npm install
) ELSE (
ECHO Requirements not met, exiting...
exit /b 0
)
IF %CODE% EQU 69 (
:: if exit code is 69, then we don't have all the dependencies we need
ECHO.
ECHO Dependencies not met.
ECHO.
EXIT /b 0
) ELSE IF %CODE% EQU 0 (
:: if exit code is 0, run web server
CALL npx http-server --port 6969 -c-1
EXIT /b 0
) ELSE (
:: if exit code is not 0, print error message
ECHO.
ECHO dependencyCheck.bat exited with code: %CODE%
ECHO Dependency check failed.
ECHO.
EXIT /b 0
)
CALL npx http-server --port 6969 -c-1
......@@ -15,7 +15,7 @@ if [[ $exitCode -eq 69 ]]; then
# if exit code is not 0, print error message
elif [[ $exitCode -ne 0 ]]; then
echo "dependencyCheck.sh exited with code: $exitCode"
echo "Dependency check failed unexpectedly."
echo "Dependency check failed."
echo ""
exit 0
# if exit code is 0, run web server
......
......@@ -20,7 +20,7 @@ IF %CODE% EQU 69 (
:: if exit code is not 0, print error message
ECHO.
ECHO dependencyCheck.bat exited with code: %CODE%
ECHO Dependency check failed unexpectedly.
ECHO Dependency check failed.
ECHO If the only thing you need is to simply compile FC, then you can use 'simple-compiler.bat' instead.
ECHO.
EXIT /b 0
......
......@@ -16,7 +16,7 @@ if [[ $exitCode -eq 69 ]]; then
# if exit code is not 0, print error message
elif [[ $exitCode -ne 0 ]]; then
echo "dependencyCheck.sh exited with code: $exitCode"
echo "Dependency check failed unexpectedly."
echo "Dependency check failed."
echo "If the only thing you need is to simply compile FC, then you can use 'simple-compiler.bat' instead."
echo ""
exit 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment