pack.bat 588 B

123456789101112131415161718
  1. @echo off
  2. set api=src\api\
  3. if not exist %api%index.prod.js (
  4. echo not exist production %api%index.prod.js
  5. echo Lack of API configuration file for online environments
  6. exit /b
  7. )
  8. if not exist %api%paracticable.js (
  9. echo not exist production %api%paracticable.js
  10. echo Lack of API configuration file for development environments
  11. exit /b
  12. )
  13. :: 备份index.js
  14. copy %api%paracticable.js %api%index.dev.js /y
  15. :: 重置index.js为线上环境
  16. copy %api%index.prod.js %api%paracticable.js /y
  17. npm run build:portal && copy %api%index.dev.js %api%paracticable.js /y && echo Done