Makefile 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. VERSION=2.0.0
  2. GLOBAL_CSS = sentry/static/styles/global.css
  3. GLOBAL_CSS_MIN = sentry/static/styles/global.min.css
  4. BOOTSTRAP_JS = sentry/static/scripts/bootstrap.js
  5. BOOTSTRAP_JS_MIN = sentry/static/scripts/bootstrap.min.js
  6. GLOBAL_JS = sentry/static/scripts/global.js
  7. GLOBAL_JS_MIN = sentry/static/scripts/global.min.js
  8. BOOTSTRAP_LESS = bootstrap/sentry.less
  9. LESS_COMPRESSOR ?= `which lessc`
  10. UGLIFY_JS ?= `which uglifyjs`
  11. WATCHR ?= `which watchr`
  12. #
  13. # Build less files
  14. #
  15. build:
  16. lessc ${BOOTSTRAP_LESS} > ${GLOBAL_CSS};
  17. lessc ${BOOTSTRAP_LESS} > ${GLOBAL_CSS_MIN} --compress;
  18. cat sentry/static/scripts/sentry.core.js sentry/static/scripts/sentry.realtime.js sentry/static/scripts/sentry.charts.js sentry/static/scripts/sentry.notifications.js sentry/static/scripts/sentry.stream.js > ${GLOBAL_JS};
  19. cat bootstrap/js/bootstrap-alert.js bootstrap/js/bootstrap-dropdown.js bootstrap/js/bootstrap-tooltip.js bootstrap/js/bootstrap-tab.js > ${BOOTSTRAP_JS};
  20. uglifyjs -nc ${GLOBAL_JS} > ${GLOBAL_JS_MIN};
  21. uglifyjs -nc ${BOOTSTRAP_JS} > ${BOOTSTRAP_JS_MIN};
  22. echo "Static assets successfully built! - `date`";
  23. #
  24. # Watch less files
  25. #
  26. watch:
  27. echo "Watching less files..."; \
  28. watchr -e "watch('bootstrap/less/.*\.less') { system 'make' }"
  29. .PHONY: build watch