build_full_frontend.sh 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #!/bin/bash
  2. . bash_library.sh # source bash_library.sh
  3. windoz=""
  4. if [[ $1 = "-w" ]]; then
  5. windoz="windoz"
  6. fi
  7. echo -e "\n${BROWN}/!\ ${NC}this script does not run 'npm install'\n${BROWN}/!\ ${NC}it also assumes your webpack dev server of frontend is running"
  8. # Tracim Lib
  9. log "cd frontend_lib"
  10. cd frontend_lib
  11. log "npm run buildtracimlib$windoz"
  12. npm run buildtracimlib$windoz
  13. cd -
  14. # app Html Document
  15. log "cd frontend_app_html-document"
  16. cd frontend_app_html-document
  17. log "npm run build$windoz # for frontend_app_html-document"
  18. npm run build$windoz
  19. log "cp dist/html-document.app.js"
  20. cp dist/html-document.app.js ../frontend/dist/app
  21. log "cp i18next.scanner/en/translation.json ../frontend/dist/app/tml-document_en_translation.json"
  22. cp i18next.scanner/en/translation.json ../frontend/dist/app/html-document_en_translation.json
  23. log "cp i18next.scanner/fr/translation.json ../frontend/dist/app/html-document_fr_translation.json"
  24. cp i18next.scanner/fr/translation.json ../frontend/dist/app/html-document_fr_translation.json
  25. cd -
  26. # app Thread
  27. log "cd frontend_app_thread"
  28. cd frontend_app_thread
  29. log "npm run build$windoz # for frontend_app_thread"
  30. npm run build$windoz
  31. log "cp dist/thread.app.js"
  32. cp dist/thread.app.js ../frontend/dist/app
  33. log "cp i18next.scanner/en/translation.json ../frontend/dist/app/thread_en_translation.json"
  34. cp i18next.scanner/en/translation.json ../frontend/dist/app/thread_en_translation.json
  35. log "cp i18next.scanner/fr/translation.json ../frontend/dist/app/thread_fr_translation.json"
  36. cp i18next.scanner/fr/translation.json ../frontend/dist/app/thread_fr_translation.json
  37. cd -