Skip to content

Commit 0c29c1d

Browse files
authored
Update and rename package_installer.bash to package_installer.bat
1 parent 2ee2320 commit 0c29c1d

File tree

2 files changed

+34
-29
lines changed

2 files changed

+34
-29
lines changed

package_installer.bash

-29
This file was deleted.

package_installer.bat

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
@echo off
2+
setlocal
3+
4+
rem Specify the package names
5+
set "package_names=blockly @blockly/shadow-block-converter"
6+
7+
rem Check if Node.js is installed
8+
where node >nul 2>nul
9+
if %errorlevel% neq 0 (
10+
echo Node.js is not installed. Please install Node.js before running this script.
11+
exit /b 1
12+
)
13+
14+
rem Check if npm is installed
15+
where npm >nul 2>nul
16+
if %errorlevel% neq 0 (
17+
echo npm is not installed. Please install npm before running this script.
18+
exit /b 1
19+
)
20+
21+
rem Loop over the array and install each package
22+
for %%i in (%package_names%) do (
23+
echo Installing %%i...
24+
npm install %%i
25+
26+
rem Check if the installation was successful
27+
if %errorlevel% equ 0 (
28+
echo Package %%i has been successfully installed.
29+
) else (
30+
echo Failed to install package %%i.
31+
)
32+
)
33+
34+
endlocal

0 commit comments

Comments
 (0)