Makefile 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # ---------- ---------- ---------- ---------- ---------- ----------
  2. #
  3. # med-appointments
  4. #
  5. # ---------- ---------- ---------- ---------- ---------- ----------
  6. target: help
  7. .PHONY: help
  8. help:
  9. @echo "Usage: make [PHONY]"
  10. @sed -n -e '/sed/! s/\.PHONY: //p' Makefile
  11. .PHONY: all
  12. all: run
  13. .PHONY: run
  14. run:
  15. @npm run serve
  16. .PHONY: upgrade
  17. upgrade:
  18. vue upgrade
  19. npm audit fix
  20. @echo "Suggestion: sudo npm update -g @vue/cli"
  21. .PHONY: init
  22. init:
  23. @npm install
  24. .PHONY: build
  25. build:
  26. @npm run build
  27. @mkdir -p output
  28. @rsync -va ./dist/ ./output/
  29. @mkdir -p output/css || echo "pass"
  30. @mkdir -p output/js || echo "pass"
  31. @cp -r ./dist/css/app.*.css ./output/css/app.css
  32. @cp -r ./dist/js/about.*.js ./output/js/about.js
  33. @cp -r ./dist/js/about.*.js.map ./output/js/about.js.map
  34. @cp -r ./dist/js/app.*.js ./output/js/app.js
  35. @cp -r ./dist/js/app.*.js.map ./output/js/app.js.map
  36. @cp -r ./dist/js/chunk-vendors.*.js ./output/js/chunk-vendors.js
  37. @cp -r ./dist/js/chunk-vendors.*.js.map ./output/js/chunk-vendors.js.map
  38. @printf '\n '`git rev-parse HEAD`
  39. @printf '\n\n'
  40. .PHONY: rebuild
  41. rebuild: clean build
  42. .PHONY: clean
  43. clean:
  44. @rm -rf dist/ output/