first_install_frontend.sh 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #!/bin/bash
  2. . bash_library.sh # source bash_library.sh
  3. windoz=""
  4. if [[ $1 = "-w" ]]; then
  5. windoz="windoz"
  6. fi
  7. log "cd frontend_lib"
  8. cd frontend_lib
  9. log "npm i"
  10. npm i
  11. log "sudo npm link"
  12. sudo npm link
  13. log "npm run buildtracimlib$windoz"
  14. npm run buildtracimlib$windoz
  15. cd -
  16. log "cd frontend_app_html-document"
  17. cd frontend_app_html-document
  18. log "npm i"
  19. npm i
  20. log "npm link tracim_frontend_lib"
  21. npm link tracim_frontend_lib
  22. log "npm run build$windoz # for frontend_app_html-document"
  23. npm run build$windoz
  24. log "cp dist/html-document.app.js"
  25. cp dist/html-document.app.js ../frontend/dist/app
  26. cd -
  27. log "cd frontend_app_thread"
  28. cd frontend_app_thread
  29. log "npm i"
  30. npm i
  31. log "npm link tracim_frontend_lib"
  32. npm link tracim_frontend_lib
  33. log "npm run build$windoz # for frontend_app_thread"
  34. npm run build$windoz
  35. log "cp dist/thread.app.js"
  36. cp dist/thread.app.js ../frontend/dist/app
  37. cd -
  38. log "cd frontend"
  39. cd frontend
  40. log "npm i"
  41. npm i
  42. log "npm link tracim_frontend_lib"
  43. npm link tracim_frontend_lib
  44. if [[ $1 = "-w" ]]; then
  45. log "npm run servdev # for frontend"
  46. npm run servdev
  47. else
  48. log "npm run servdev-dashboard # for frontend"
  49. npm run servdev-dashboard
  50. fi