build_full_frontend.sh 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. log "cd frontend_lib"
  9. cd frontend_lib
  10. log "npm run buildtracimlib$windoz"
  11. npm run buildtracimlib$windoz
  12. cd -
  13. log "cd frontend_app_html-document"
  14. cd frontend_app_html-document
  15. log "npm run build$windoz # for frontend_app_html-document"
  16. npm run build$windoz
  17. log "cp dist/html-document.app.js"
  18. cp dist/html-document.app.js ../frontend/dist/app
  19. log "cp i18next.scanner/en/translation.json ../frontend/dist/app/tml-document_en_translation.json"
  20. cp i18next.scanner/en/translation.json ../frontend/dist/app/html-document_en_translation.json
  21. log "cp i18next.scanner/fr/translation.json ../frontend/dist/app/html-document_fr_translation.json"
  22. cp i18next.scanner/fr/translation.json ../frontend/dist/app/html-document_fr_translation.json
  23. cd -
  24. log "cd frontend_app_thread"
  25. cd frontend_app_thread
  26. log "npm run build$windoz # for frontend_app_thread"
  27. npm run build$windoz
  28. log "cp dist/thread.app.js"
  29. cp dist/thread.app.js ../frontend/dist/app
  30. log "cp i18next.scanner/en/translation.json ../frontend/dist/app/thread_en_translation.json"
  31. cp i18next.scanner/en/translation.json ../frontend/dist/app/thread_en_translation.json
  32. log "cp i18next.scanner/fr/translation.json ../frontend/dist/app/thread_fr_translation.json"
  33. cp i18next.scanner/fr/translation.json ../frontend/dist/app/thread_fr_translation.json
  34. cd -