1
0
Fork 0
mirror of https://github.com/twbs/bootstrap.git synced 2022-11-09 12:25:43 -05:00
twbs--bootstrap/Makefile

37 lines
No EOL
1 KiB
Makefile

BOOTSTRAP = ./docs/assets/css/bootstrap.css
BOOTSTRAP_LESS = ./less/bootstrap.less
BOOTSTRAP_RESPONSIVE = ./docs/assets/css/bootstrap-responsive.css
BOOTSTRAP_RESPONSIVE_LESS = ./less/responsive.less
LESS_COMPRESSOR ?= `which lessc`
UGLIFY_JS ?= `which uglifyjs`
WATCHR ?= `which watchr`
#
# Build less files + docs
#
build:
@if test ! -z ${LESS_COMPRESSOR}; then \
lessc ${BOOTSTRAP_LESS} > ${BOOTSTRAP}; \
lessc ${BOOTSTRAP_RESPONSIVE_LESS} > ${BOOTSTRAP_RESPONSIVE}; \
node docs/build; \
cp img/* docs/assets/img/; \
else \
echo "You must have the LESS compiler installed in order to build Bootstrap."; \
echo "You can install it by running: npm install less -g"; \
fi
#
# Watch less files
#
watch:
@if test ! -z ${WATCHR}; then \
echo "Watching less files..."; \
watchr -e "watch('less/.*\.less') { system 'make' }"; \
else \
echo "You must have the watchr installed in order to watch Bootstrap Less files."; \
echo "You can install it by running: gem install watchr"; \
fi
.PHONY: build watch