launcher upgrades

+added ability to clear npm cache
This commit is contained in:
deffcolony
2024-12-02 11:54:49 +01:00
parent 471ddec8c8
commit c5896e497a
3 changed files with 49 additions and 17 deletions

View File

@@ -0,0 +1,20 @@
@echo off
:remove_npm_cache
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Clearing npm cache...
npm cache clean --force
if %errorlevel% neq 0 (
echo %red_bg%[%time%]%reset% %red_fg_strong%[ERROR] Could not clear npm cache.%reset%
echo Please try again.
pause
goto :npm_exit
)
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% %green_fg_strong%npm cache cleared successfully.%reset%
pause
:npm_exit
if "%caller%"=="home" (
exit /b 1
) else (
exit /b 0
)

View File

@@ -4,12 +4,12 @@
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Clearing pip cache...
pip cache purge
if %errorlevel% neq 0 (
echo %red_bg%[%time%]%reset% %red_fg_strong%[ERROR] Could not clear the pip cache.%reset%
echo %red_bg%[%time%]%reset% %red_fg_strong%[ERROR] Could not clear pip cache.%reset%
echo Please try again.
pause
goto :pip_exit
)
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% %green_fg_strong%The pip cache has been cleared successfully.%reset%
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% %green_fg_strong%pip cache cleared successfully.%reset%
pause
:pip_exit