third.sh 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. #!/bin/bash
  2. set -e
  3. install_oauth() {
  4. yarn add @react-oauth/google@latest react-facebook-login
  5. }
  6. install_react() {
  7. yarn add filesize dayjs timezones-list grpc-web \
  8. moment moment-timezone date-fns \
  9. marked @types/marked \
  10. diff @types/diff \
  11. lodash @types/lodash \
  12. @fortawesome/fontawesome-free \
  13. famfamfam-flags famfamfam-silk famfamfam-mini \
  14. google-protobuf @types/google-protobuf \
  15. js-cookie @types/js-cookie \
  16. mermaid \
  17. jwt-decode dinero.js@alpha \
  18. video.js @types/video.js \
  19. react-copy-to-clipboard @types/react-copy-to-clipboard \
  20. react-quill react-dropzone \
  21. google-map-react qrcode.react \
  22. react-markdown @uiw/react-md-editor \
  23. react-color @types/react-color \
  24. react-pdf @types/react-pdf \
  25. react-json-view react-syntax-highlighter \
  26. emoji-mart react-sparklines react-highlight-words \
  27. react-number-format react-image-crop \
  28. react-player \
  29. react-draggable \
  30. react-big-calendar @types/react-big-calendar \
  31. react-intl \
  32. react-router-dom@latest \
  33. react-helmet-async \
  34. formik yup \
  35. @reduxjs/toolkit react-redux
  36. }
  37. # https://ant.design/docs/react/getting-started
  38. install_ant_design() {
  39. yarn add antd @ant-design/pro-components @ant-design/charts
  40. }
  41. # https://developer.microsoft.com/en-us/fluentui#/get-started/web
  42. install_fluent_ui(){
  43. yarn add @fluentui/react
  44. }
  45. # https://mui.com/material-ui/getting-started/overview/
  46. install_material_design() {
  47. yarn add @mui/material @emotion/react @emotion/styled \
  48. @mui/icons-material @fontsource/roboto \
  49. @mui/x-date-pickers
  50. }
  51. # https://react-bootstrap.github.io/getting-started/introduction
  52. install_bootstrap() {
  53. yarn add react-bootstrap bootstrap
  54. }
  55. if [ "$#" -ne 1 ]
  56. then
  57. echo "USAGE: $0 material|fluent|antd|bootstrap"
  58. exit 1
  59. fi
  60. # yarn add @originjs/vite-plugin-commonjs --dev
  61. if [ $1 == "material" ]
  62. then
  63. install_react
  64. install_material_design
  65. elif [ $1 == "antd" ]
  66. then
  67. install_react
  68. install_ant_design
  69. elif [ $1 == "fluent" ]
  70. then
  71. install_react
  72. install_fluent_ui
  73. elif [ $1 == "bootstrap" ]
  74. then
  75. install_react
  76. install_bootstrap
  77. else
  78. echo "unknown option $1"
  79. exit 1
  80. fi
  81. echo "Done($1)."
  82. exit 0