Makefile 834 B

123456789101112131415161718192021222324252627282930
  1. VERSION=2.0.0
  2. BOOTSTRAP = ../sentry/static/styles/global.css
  3. BOOTSTRAP_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. BOOTSTRAP_LESS = ./sentry.less
  7. LESS_COMPRESSOR ?= `which lessc`
  8. UGLIFY_JS ?= `which uglifyjs`
  9. WATCHR ?= `which watchr`
  10. #
  11. # Build less files
  12. #
  13. build:
  14. lessc ${BOOTSTRAP_LESS} > ${BOOTSTRAP};
  15. lessc ${BOOTSTRAP_LESS} > ${BOOTSTRAP_MIN} --compress;
  16. cat js/bootstrap-alert.js js/bootstrap-dropdown.js js/bootstrap-tooltip.js js/bootstrap-tab.js > ${BOOTSTRAP_JS};
  17. uglifyjs -nc ${BOOTSTRAP_JS} > ${BOOTSTRAP_JS_MIN};
  18. echo "Bootstrap successfully built! - `date`";
  19. #
  20. # Watch less files
  21. #
  22. watch:
  23. echo "Watching less files..."; \
  24. watchr -e "watch('less/.*\.less') { system 'make' }"
  25. .PHONY: build watch