diff options
Diffstat (limited to 'installer/npm_install.cmd')
-rw-r--r-- | installer/npm_install.cmd | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/installer/npm_install.cmd b/installer/npm_install.cmd new file mode 100644 index 0000000..d17c974 --- /dev/null +++ b/installer/npm_install.cmd @@ -0,0 +1,21 @@ +@echo off + +if "x%1" equ "x" goto :EOF +if "x%2" equ "x" goto :EOF + +set server_dir="..\servers\%1" +rd /Q /S "%server_dir%" 2>NUL +md "%server_dir%" +cd "%server_dir%" + +call npm init -y + +echo {"name":""}>package.json + +call npm install "%2" + +echo @echo off ^ + +call %%~dp0\node_modules\.bin\%1.cmd %%* ^ + +> %1.cmd |