Makefile 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. BOOTPLUS = ../../desktop/core/src/desktop/static/desktop/ext/css/bootplus.css
  2. BOOTPLUS_LESS = ./less/bootplus/bootplus.less
  3. BOOTPLUS_RESPONSIVE = ../../desktop/core/src/desktop/static/desktop/ext/css/bootplus-responsive.css
  4. BOOTPLUS_RESPONSIVE_LESS = ./less/bootplus/responsive.less
  5. DATE=$(shell date +%I:%M%p)
  6. CHECK=\033[32m✔ Done\033[39m
  7. HR=\033[37m--------------------------------------------------\033[39m
  8. PATH := ./node_modules/.bin:$(PATH)
  9. #
  10. # BUILD DOCS
  11. #
  12. build:
  13. @echo "\n${HR}"
  14. @echo "Building Bootplus..."
  15. @echo "${HR}\n"
  16. @printf "Compiling LESS with Recess..."
  17. @recess --compress ${BOOTPLUS_LESS} > ${BOOTPLUS}
  18. @recess --compress ${BOOTPLUS_RESPONSIVE_LESS} > ${BOOTPLUS_RESPONSIVE}
  19. @echo " ${CHECK}"
  20. @echo "\n${HR}"
  21. @echo "Bootplus successfully built at ${DATE}."
  22. @echo "${HR}\n"
  23. @echo "Thanks for using Bootplus"
  24. #
  25. # BUILD SIMPLE BOOTPLUS DIRECTORY
  26. # recess & uglifyjs are required
  27. #
  28. bootplus: bootplus-css
  29. #
  30. # CSS COMPILE
  31. #
  32. bootplus-css: bootplus/css/*.css
  33. bootplus/css/*.css: less/*.less
  34. mkdir -p bootplus/css
  35. ./node_modules/.bin/recess --compile ${BOOTPLUS_LESS} > bootplus/css/bootplus.css
  36. ./node_modules/.bin/recess --compress ${BOOTPLUS_LESS} > bootplus/css/bootplus.min.css
  37. ./node_modules/.bin/recess --compile ${BOOTPLUS_RESPONSIVE_LESS} > bootplus/css/bootplus-responsive.css
  38. ./node_modules/.bin/recess --compress ${BOOTPLUS_RESPONSIVE_LESS} > bootplus/css/bootplus-responsive.min.css
  39. mkdir -p bootplus/font
  40. cp -R docs/assets/font/*.* bootplus/font
  41. #
  42. # WATCH LESS FILES
  43. #
  44. watch:
  45. echo "Watching less files..."; \
  46. watchr -e "watch('less/.*\.less') { system 'make' }"
  47. .PHONY: watch bootplus-css