first_install_frontend.sh 876B

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