compile-services 390 B

123456789101112131415161718192021222324
  1. #! env bash
  2. set -e
  3. grep 'name:' config/services.js | \
  4. sed 's/.*name: "\(.*\)",/\1/' | \
  5. while read service
  6. do
  7. pushd $service
  8. echo "Compiling Service $service"
  9. case $service in
  10. web)
  11. make compile_full
  12. WEBPACK_ENV=production make minify
  13. ;;
  14. chat)
  15. echo "$service doesn't require a compilation"
  16. ;;
  17. *)
  18. npm run compile:all
  19. ;;
  20. esac
  21. popd
  22. done