Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Thornton <jacobthornton@gmail.com>2012-01-30 01:15:37 +0400
committerJacob Thornton <jacobthornton@gmail.com>2012-01-30 01:15:37 +0400
commit49d565a6da38359a776f83f31a1f1ccd658c88a7 (patch)
treeefc1f05f3a0b2d6b8cb9ee0633f7933f1c5728ab /Makefile
parent22d52fca46c792c08bd316298c4dd85e52bf531f (diff)
move building zip file into docs/makefile
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile53
1 files changed, 32 insertions, 21 deletions
diff --git a/Makefile b/Makefile
index 399b57c6e1..fed5ffca46 100644
--- a/Makefile
+++ b/Makefile
@@ -6,31 +6,42 @@ LESS_COMPRESSOR ?= `which lessc`
WATCHR ?= `which watchr`
#
-# Build less files + docs
+# BUILD 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
+docs: dist
+ cp -r dist bootstrap
+ zip -r docs/assets/bootstrap.zip bootstrap
+ rm -r bootstrap
+ lessc ${BOOTSTRAP_LESS} > ${BOOTSTRAP}
+ lessc ${BOOTSTRAP_RESPONSIVE_LESS} > ${BOOTSTRAP_RESPONSIVE}
+ node docs/build
+ cp img/* docs/assets/img/
#
-# Watch less files
+# BUILD SIMPLE DIST DIRECTORY
+# lessc & uglifyjs are required
+#
+
+dist:
+ mkdir -p dist/img
+ mkdir -p dist/css
+ mkdir -p dist/js
+ cp img/* dist/img/
+ lessc ${BOOTSTRAP_LESS} > dist/css/bootstrap.css
+ lessc --compress ${BOOTSTRAP_LESS} > dist/css/bootstrap.min.css
+ lessc ${BOOTSTRAP_RESPONSIVE_LESS} > dist/css/bootstrap.responsive
+ lessc --compress ${BOOTSTRAP_RESPONSIVE_LESS} > dist/css/bootstrap.min.responsive
+ cat js/bootstrap-transition.js js/bootstrap-alert.js js/bootstrap-button.js js/bootstrap-carousel.js js/bootstrap-collapse.js js/bootstrap-dropdown.js js/bootstrap-modal.js js/bootstrap-tooltip.js js/bootstrap-popover.js js/bootstrap-scrollspy.js js/bootstrap-tab.js js/bootstrap-typeahead.js > dist/js/bootstrap.js
+ uglifyjs -nc dist/js/bootstrap.js > dist/js/bootstrap.min.js
+
+#
+# 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 \ No newline at end of file
+ echo "Watching less files..."; \
+ watchr -e "watch('less/.*\.less') { system 'make' }"
+
+
+.PHONY: dist docs watch \ No newline at end of file