build_full_frontend.sh 2.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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 -
  38. # app Admin Workspace User
  39. log "cd frontend_app_admin_workspace_user"
  40. cd frontend_app_admin_workspace_user
  41. log "npm run build$windoz # for frontend_app_thread"
  42. npm run build$windoz
  43. log "cp dist/admin_workspace_user.app.js"
  44. cp dist/admin_workspace_user.app.js ../frontend/dist/app
  45. log "cp i18next.scanner/en/translation.json ../frontend/dist/app/admin_workspace_user_en_translation.json"
  46. cp i18next.scanner/en/translation.json ../frontend/dist/app/admin_workspace_user_en_translation.json
  47. log "cp i18next.scanner/fr/translation.json ../frontend/dist/app/admin_workspace_user_fr_translation.json"
  48. cp i18next.scanner/fr/translation.json ../frontend/dist/app/admin_workspace_user_fr_translation.json
  49. cd -