@echo off
chcp 65001 >nul
title Mega-X - Dong goi website cho Google
cd /d "%~dp0"
where node >nul 2>nul
if errorlevel 1 (
  echo Chua cai Node.js. Tai ban LTS tai https://nodejs.org roi chay lai file nay.
  pause
  exit /b 1
)
if not exist node_modules (
  echo Lan dau chay: dang cai thu vien can thiet, vui long cho 1-2 phut...
  call npm install jsdom --no-audit --no-fund
  if errorlevel 1 (
    echo Cai thu vien that bai. Kiem tra ket noi mang roi chay lai.
    pause
    exit /b 1
  )
)
node build.js %*
echo.
echo Xong. Thu muc dong goi: ..\ban-dong-goi   va   file zip: ..\megax-web-cloudflare.zip
pause
