first_install_frontend.sh 933B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #!/bin/bash
  2. windoz=""
  3. if [[ $1 = "-w" ]]; then
  4. windoz="windoz"
  5. fi
  6. BROWN='\033[0;33m'
  7. NC='\033[0m' # No Color
  8. function log {
  9. echo -e "\n${BROWN}>> $ $1${NC}\n"
  10. }
  11. log "cd frontend_lib"
  12. cd frontend_lib
  13. log "npm i"
  14. npm i
  15. log "npm link"
  16. npm link
  17. log "npm run buildtracimlib$windoz"
  18. npm run buildtracimlib$windoz
  19. cd -
  20. log "cd frontend_app_html-document"
  21. cd frontend_app_html-document
  22. log "npm i"
  23. npm i
  24. log "npm link tracim_frontend_lib"
  25. npm link tracim_frontend_lib
  26. log "npm run build$windoz # for frontend_app_html-document"
  27. npm run build$windoz
  28. log "cp dist/html-document.app.js"
  29. cp dist/html-document.app.js ../frontend/dist/app
  30. cd -
  31. log "cd frontend"
  32. cd frontend
  33. log "npm i"
  34. npm i
  35. log "npm link tracim_frontend_lib"
  36. npm link tracim_frontend_lib
  37. if [[ $1 = "-w" ]]; then
  38. log "npm run servdev # for frontend"
  39. npm run servdev
  40. else
  41. log "npm run servdev-dashboard # for frontend"
  42. npm run servdev-dashboard
  43. fi