Add more flexible node env script
This commit is contained in:
parent
94fdcda5ef
commit
0b40b06661
@ -1,7 +0,0 @@
|
|||||||
@echo off
|
|
||||||
setlocal
|
|
||||||
set path_to_add=%devenver_root%\NodeJS\12.22.12
|
|
||||||
set path=%path_to_add%;%path%
|
|
||||||
echo [DEVENVER] "%~dpnx0" is adding to path "%path_to_add%"
|
|
||||||
call %*
|
|
||||||
endlocal
|
|
@ -1,7 +0,0 @@
|
|||||||
@echo off
|
|
||||||
setlocal
|
|
||||||
set path_to_add=%devenver_root%\NodeJS\16.19.0
|
|
||||||
set path=%path_to_add%;%path%
|
|
||||||
echo [DEVENVER] "%~dpnx0" is adding to path "%path_to_add%"
|
|
||||||
call %*
|
|
||||||
endlocal
|
|
@ -1,7 +0,0 @@
|
|||||||
@echo off
|
|
||||||
setlocal
|
|
||||||
set path_to_add=%devenver_root%\NodeJS\18.15.0
|
|
||||||
set path=%path_to_add%;%path%
|
|
||||||
echo [DEVENVER] "%~dpnx0" is adding to path "%path_to_add%"
|
|
||||||
call %*
|
|
||||||
endlocal
|
|
23
Win/Scripts/node_env.bat
Normal file
23
Win/Scripts/node_env.bat
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
@echo off
|
||||||
|
setlocal EnableDelayedExpansion
|
||||||
|
set root_path=%devenver_root%\NodeJS
|
||||||
|
|
||||||
|
if "%~1"=="help" goto :help
|
||||||
|
if "%~1"=="" goto :help
|
||||||
|
if "%~1"=="--help" goto :help
|
||||||
|
if "%~1"=="/?" goto :help
|
||||||
|
goto :run
|
||||||
|
|
||||||
|
:help
|
||||||
|
echo USAGE: node_env.bat ^<version^> ^<command^>
|
||||||
|
echo.
|
||||||
|
echo VERSIONS:
|
||||||
|
ls %root_path%
|
||||||
|
goto :eof
|
||||||
|
|
||||||
|
:run
|
||||||
|
set version=%~1
|
||||||
|
for /f "tokens=1,* delims= " %%a in ("%*") do set remaining_args=%%b
|
||||||
|
echo [SCRIPT] Executing %root_path%\%version%\%remaining_args%
|
||||||
|
|
||||||
|
%root_path%\%version%\%remaining_args%
|
Loading…
Reference in New Issue
Block a user