Skip to content

Commit

Permalink
chore: Update run.bat to check for pnpm installation and install depe…
Browse files Browse the repository at this point in the history
…ndencies if node_modules does not exist
  • Loading branch information
appujet committed Jul 31, 2024
1 parent d8b37a4 commit c3abeaf
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion run.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
@echo off
npm start
setlocal enabledelayedexpansion

:: Check if pnpm is installed

where pnpm >nul 2>nul
if %errorlevel% equ 0 (
set package_manager=pnpm
) else (
set package_manager=npm
)

:: Check if node_modules exists
if not exist node_modules (
%package_manager% install
)

:: start the project
%package_manager% run start

0 comments on commit c3abeaf

Please sign in to comment.