]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
move building zip file into docs/makefile
authorJacob Thornton <jacobthornton@gmail.com>
Sun, 29 Jan 2012 21:15:37 +0000 (13:15 -0800)
committerJacob Thornton <jacobthornton@gmail.com>
Sun, 29 Jan 2012 21:15:37 +0000 (13:15 -0800)
Makefile
docs/assets/bootstrap.zip [new file with mode: 0644]
docs/index.html
docs/templates/pages/index.mustache

index 399b57c6e149176606965204ef96e0cd0d5977b9..fed5ffca467e9e7bbc8720ae9e7d403427d18765 100644 (file)
--- 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
diff --git a/docs/assets/bootstrap.zip b/docs/assets/bootstrap.zip
new file mode 100644 (file)
index 0000000..0e691e2
Binary files /dev/null and b/docs/assets/bootstrap.zip differ
index 89f5accd68b3e5ff9495319a98379a73b943e417..3ecc7718f8dee749294374d4410daa63f0003dd7 100644 (file)
@@ -80,7 +80,7 @@
             <p>Simple and flexible HTML, CSS, and Javascript for popular user interface components and interactions.</p>
             <p class="download-info">
               <a href="https://github.com/twitter/bootstrap/" class="btn primary btn-large">View project on GitHub</a>
-              <a href="http://bootstrap.herokuapp.com/bootstrap.zip" class="btn btn-large">Download Bootstrap</a>
+              <a href="assets/bootstrap.zip" class="btn btn-large">Download Bootstrap</a>
             </p>
             <div class="benefits">
               <h4>Feature highlights</h4>
index 5fa70645a6142dbf0629844dc6b5482bf9d47749..7a98afa07dd234030d2e53b976d3f454a311dd6b 100644 (file)
@@ -8,7 +8,7 @@
             <p>Simple and flexible HTML, CSS, and Javascript for popular user interface components and interactions.</p>
             <p class="download-info">
               <a href="https://github.com/twitter/bootstrap/" class="btn primary btn-large">{{_i}}View project on GitHub{{/i}}</a>
-              <a href="http://bootstrap.herokuapp.com/bootstrap.zip" class="btn btn-large">{{_i}}Download Bootstrap{{/i}}</a>
+              <a href="assets/bootstrap.zip" class="btn btn-large">{{_i}}Download Bootstrap{{/i}}</a>
             </p>
             <div class="benefits">
               <h4>{{_i}}Feature highlights{{/i}}</h4>