File tree Expand file tree Collapse file tree 4 files changed +78
-2
lines changed
Expand file tree Collapse file tree 4 files changed +78
-2
lines changed Original file line number Diff line number Diff line change 44 "description" : " " ,
55 "scripts" : {
66 "test" : " echo \" Error: no test specified\" && exit 1" ,
7- "postinstall" : " (cd ./api && npm install) ; (cd ./ui && npm install) ; (cd ./upload-api && npm install)" ,
87 "env" : " npm start" ,
98 "api" : " cd ./api && npm run dev" ,
109 "upload" : " cd ./upload-api && npm run dev" ,
4443 "dependencies" : {
4544 "@contentstack/cli-utilities" : " ^1.8.4"
4645 }
47- }
46+ }
Original file line number Diff line number Diff line change 1+ @ echo off
2+ SET SCRIPT_DIR = %~dp0
3+ CD /D " %SCRIPT_DIR% "
4+
5+ echo Using Node version:
6+ node -v
7+
8+ call npm run setup:file
9+ call npm run create:env
10+
11+ start " API" cmd /k " cd /d %SCRIPT_DIR% \api && npm install && npm run windev"
12+ start " Upload API" cmd /k " cd /d %SCRIPT_DIR% \upload-api && npm install && npm run start"
13+ start " UI" cmd /k " cd /d %SCRIPT_DIR% \ui && npm install && npm run start"
14+
15+ echo All services started!
Original file line number Diff line number Diff line change 1+ @ echo off
2+ SETLOCAL
3+
4+ echo Checking if NVM is already installed...
5+
6+ where nvm > nul 2 > nul
7+ IF %ERRORLEVEL% EQU 0 (
8+ echo NVM is already installed. Skipping installation.
9+ goto run_setup
10+ )
11+
12+ echo NVM not found. Checking for winget...
13+
14+ where winget > nul 2 > nul
15+ IF %ERRORLEVEL% EQU 0 (
16+ echo Installing NVM using winget...
17+ winget install -e --id CoreyButler.NVMforWindows
18+ goto check_nvm
19+ )
20+
21+ echo winget not found. Installing NVM manually...
22+ SET NVM_URL = https://github.com/coreybutler/nvm-windows/releases/latest/download/nvm-setup.exe
23+ SET NVM_INSTALLER = %TEMP% \nvm-setup.exe
24+
25+ IF EXIST " %NVM_INSTALLER% " DEL /F /Q " %NVM_INSTALLER% "
26+
27+ powershell -Command " [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri '%NVM_URL% ' -OutFile '%NVM_INSTALLER% '"
28+
29+ IF EXIST " %NVM_INSTALLER% " (
30+ echo Running NVM installer...
31+ start /wait " " " %NVM_INSTALLER% "
32+ ) ELSE (
33+ echo Failed to download NVM installer.
34+ pause
35+ exit /b 1
36+ )
37+
38+ :check_nvm
39+ echo Verifying NVM installation...
40+
41+ where nvm > nul 2 > nul
42+ IF %ERRORLEVEL% NEQ 0 (
43+ echo NVM installation failed or not detected in PATH.
44+ echo Please restart your terminal and try again, or install manually:
45+ echo https://github.com/coreybutler/nvm-windows
46+ pause
47+ exit /b 1
48+ )
49+
50+ :run_setup
51+ echo NVM is ready. Running setup.bat...
52+ call setup.bat
Original file line number Diff line number Diff line change 1+ SETLOCAL ENABLEDELAYEDEXPANSION
2+
3+ SET SCRIPT_DIR = %~dp0
4+ CD /D " %SCRIPT_DIR% "
5+
6+ call nvm install 21
7+ call nvm use 21
8+
9+ REM Call second script in a new process to reload env
10+ start " " cmd /k " %SCRIPT_DIR% setup-continue.bat"
You can’t perform that action at this time.
0 commit comments