diff options
author | Jacob Thornton <jacobthornton@gmail.com> | 2012-04-24 13:21:45 +0400 |
---|---|---|
committer | Jacob Thornton <jacobthornton@gmail.com> | 2012-04-24 13:21:45 +0400 |
commit | e659dc7e1be2e09cec34703dce8c737496e3504e (patch) | |
tree | be3caed12a3de1218e1fd548f2564302e6c8193a /Makefile | |
parent | 6506ede6323ee60d4d7f8171937d92141a64e09e (diff) | |
parent | 839ef3a030b355d0f0c35d6c9e42ecba8b072036 (diff) |
Merge branch '2.0.3-wip'
Conflicts:
Makefile
docs/assets/js/bootstrap.js
docs/assets/js/bootstrap.min.js
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 75 |
1 files changed, 53 insertions, 22 deletions
@@ -2,29 +2,57 @@ 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` -WATCHR ?= `which watchr` +DATE=$(shell date +%I:%M%p) +CHECK=\033[32m✔\033[39m +HR=\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\# + # # BUILD DOCS # -docs: bootstrap - rm docs/assets/bootstrap.zip - zip -r docs/assets/bootstrap.zip bootstrap - cp bootstrap/js/bootstrap.js docs/assets/js/bootstrap.js - cp bootstrap/js/bootstrap.min.js docs/assets/js/bootstrap.min.js - rm -r bootstrap - lessc ${BOOTSTRAP_LESS} > ${BOOTSTRAP} - lessc ${BOOTSTRAP_RESPONSIVE_LESS} > ${BOOTSTRAP_RESPONSIVE} - node docs/build - cp img/* docs/assets/img/ - cp js/*.js docs/assets/js/ - cp js/tests/vendor/jquery.js docs/assets/js/ +build: + @echo "\n${HR}" + @echo "Building Bootstrap..." + @echo "${HR}\n" + @jshint js/*.js --config js/.jshintrc + @jshint js/tests/unit/*.js --config js/.jshintrc + @echo "Running JSHint on javascript... ${CHECK} Done" + @recess --compile ${BOOTSTRAP_LESS} > ${BOOTSTRAP} + @recess --compile ${BOOTSTRAP_RESPONSIVE_LESS} > ${BOOTSTRAP_RESPONSIVE} + @echo "Compiling LESS with Recess... ${CHECK} Done" + @node docs/build + @cp img/* docs/assets/img/ + @cp js/*.js docs/assets/js/ + @cp js/tests/vendor/jquery.js docs/assets/js/ + @echo "Compiling documentation... ${CHECK} Done" + @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 > docs/assets/js/bootstrap.js + @uglifyjs -nc docs/assets/js/bootstrap.js > docs/assets/js/bootstrap.min.tmp.js + @echo "/**\n* Bootstrap.js by @fat & @mdo\n* Copyright 2012 Twitter, Inc.\n* http://www.apache.org/licenses/LICENSE-2.0.txt\n*/" > docs/assets/js/copyright.js + @cat docs/assets/js/copyright.js docs/assets/js/bootstrap.min.tmp.js > docs/assets/js/bootstrap.min.js + @rm docs/assets/js/copyright.js docs/assets/js/bootstrap.min.tmp.js + @echo "Compiling and minifying javascript... ${CHECK} Done" + @echo "\n${HR}" + @echo "Bootstrap successfully built at ${DATE}." + @echo "${HR}\n" + @echo "Thanks for using Bootstrap," + @echo "<3 @mdo and @fat\n" + +# +# RUN JSHINT & QUNIT TESTS IN PHANTOMJS +# + +test: + jshint js/*.js --config js/.jshintrc + jshint js/tests/unit/*.js --config js/.jshintrc + node js/tests/server.js & + phantomjs js/tests/phantom.js "http://localhost:3000/js/tests" + kill -9 `cat js/tests/pid.txt` + rm js/tests/pid.txt # # BUILD SIMPLE BOOTSTRAP DIRECTORY -# lessc & uglifyjs are required +# recess & uglifyjs are required # bootstrap: @@ -32,13 +60,13 @@ bootstrap: mkdir -p bootstrap/css mkdir -p bootstrap/js cp img/* bootstrap/img/ - lessc ${BOOTSTRAP_LESS} > bootstrap/css/bootstrap.css - lessc --compress ${BOOTSTRAP_LESS} > bootstrap/css/bootstrap.min.css - lessc ${BOOTSTRAP_RESPONSIVE_LESS} > bootstrap/css/bootstrap-responsive.css - lessc --compress ${BOOTSTRAP_RESPONSIVE_LESS} > bootstrap/css/bootstrap-responsive.min.css + recess --compile ${BOOTSTRAP_LESS} > bootstrap/css/bootstrap.css + recess --compress ${BOOTSTRAP_LESS} > bootstrap/css/bootstrap.min.css + recess --compile ${BOOTSTRAP_RESPONSIVE_LESS} > bootstrap/css/bootstrap-responsive.css + recess --compress ${BOOTSTRAP_RESPONSIVE_LESS} > bootstrap/css/bootstrap-responsive.min.css 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 > bootstrap/js/bootstrap.js uglifyjs -nc bootstrap/js/bootstrap.js > bootstrap/js/bootstrap.min.tmp.js - echo "/**\n* Bootstrap.js by @fat & @mdo\n* Copyright 2012 Twitter, Inc.\n* http://www.apache.org/licenses/LICENSE-2.0.txt\n*/" > bootstrap/js/copyright.js + echo "/*!\n* Bootstrap.js by @fat & @mdo\n* Copyright 2012 Twitter, Inc.\n* http://www.apache.org/licenses/LICENSE-2.0.txt\n*/" > bootstrap/js/copyright.js cat bootstrap/js/copyright.js bootstrap/js/bootstrap.min.tmp.js > bootstrap/js/bootstrap.min.js rm bootstrap/js/copyright.js bootstrap/js/bootstrap.min.tmp.js @@ -46,7 +74,10 @@ bootstrap: # MAKE FOR GH-PAGES 4 FAT & MDO ONLY (O_O ) # -gh-pages: docs +gh-pages: bootstrap docs + rm -f docs/assets/bootstrap.zip + zip -r docs/assets/bootstrap.zip bootstrap + rm -r bootstrap rm -f ../bootstrap-gh-pages/assets/bootstrap.zip node docs/build production cp -r docs/* ../bootstrap-gh-pages @@ -60,4 +91,4 @@ watch: watchr -e "watch('less/.*\.less') { system 'make' }" -.PHONY: docs watch gh-pages +.PHONY: docs watch gh-pages
\ No newline at end of file |