first_install_frontend.sh 886B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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"
  28. cd frontend
  29. log "npm i"
  30. npm i
  31. log "npm link tracim_frontend_lib"
  32. npm link tracim_frontend_lib
  33. if [[ $1 = "-w" ]]; then
  34. log "npm run servdev # for frontend"
  35. npm run servdev
  36. else
  37. log "npm run servdev-dashboard # for frontend"
  38. npm run servdev-dashboard
  39. fi