build.bat 579 B

1234567891011121314151617181920212223242526
  1. @echo off
  2. REM Kill all node.exe processes except for the one associated with your build script
  3. for /f "tokens=2" %%a in ('tasklist ^| findstr /i /c:"node.exe" /c:"BUILD_PROCESS=yes"') do (
  4. taskkill /F /PID %%a
  5. )
  6. REM Close the terminal window (Windows Terminal)
  7. taskkill /F /IM WindowsTerminal.exe
  8. REM Start the build watch process using Node.js
  9. start cmd /k "npm run watch"
  10. //REM Close the terminal window
  11. //taskkill /F /IM WindowsTerminal.exe
  12. // taskkill /F /IM cmd.exe
  13. //REM Stop server 1
  14. //taskkill /F /IM node.exe /T
  15. //REM Add more server stop commands as needed