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

44 lines
1.4 KiB
Makefile
Raw Normal View History

VERSION=2.0.0
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
2012-01-24 14:37:57 -05:00
LESS_COMPRESSOR ?= `which lessc`
UGLIFY_JS ?= `which uglifyjs`
WATCHR ?= `which watchr`
2012-01-23 17:14:16 -05:00
#
# Build less files + docs
2012-01-23 17:14:16 -05:00
#
build:
2012-01-24 14:37:57 -05:00
@@if test ! -z ${LESS_COMPRESSOR}; then \
2011-12-25 01:31:39 -05:00
sed -e 's/@VERSION/'"v${VERSION}"'/' -e 's/@DATE/'"`date`"'/' <${BOOTSTRAP_LESS} >${BOOTSTRAP_LESS}.tmp; \
lessc ${BOOTSTRAP_LESS}.tmp > ${BOOTSTRAP}; \
rm -f ${BOOTSTRAP_LESS}.tmp; \
sed -e 's/@VERSION/'"v${VERSION}"'/' -e 's/@DATE/'"`date`"'/' <${BOOTSTRAP_RESPONSIVE_LESS} >${BOOTSTRAP_RESPONSIVE_LESS}.tmp; \
lessc ${BOOTSTRAP_RESPONSIVE_LESS}.tmp > ${BOOTSTRAP_RESPONSIVE}; \
rm -f ${BOOTSTRAP_RESPONSIVE_LESS}.tmp; \
node docs/build; \
cp img/* docs/assets/img/; \
echo "Bootstrap successfully built! - `date`"; \
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
2012-01-23 17:14:16 -05:00
#
# Watch less files
#
watch:
2011-07-28 20:50:38 -04:00
@@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
2012-01-23 17:14:16 -05:00
.PHONY: build watch