From 5204f206b982a9ded4a70e8f900fdf5811f4e557 Mon Sep 17 00:00:00 2001 From: Nicolas Dudebout Date: Sun, 11 Nov 2012 19:13:43 -0500 Subject: [PATCH 1/8] Splits the progress @echo statements in the Makefile. --- Makefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 18f77c2254..cb776a6bf0 100644 --- a/Makefile +++ b/Makefile @@ -13,22 +13,26 @@ build: @echo "\n${HR}" @echo "Building Bootstrap..." @echo "${HR}\n" + @echo -n "Running JSHint on javascript..." @jshint js/*.js --config js/.jshintrc @jshint js/tests/unit/*.js --config js/.jshintrc - @echo "Running JSHint on javascript... ${CHECK} Done" + @echo " ${CHECK} Done" + @echo -n "Compiling LESS with Recess..." @./node_modules/.bin/recess --compile ${BOOTSTRAP_LESS} > ${BOOTSTRAP} - @echo "Compiling LESS with Recess... ${CHECK} Done" + @echo " ${CHECK} Done" + @echo -n "Compiling documentation..." @node docs/build @cp fonts/* docs/assets/fonts/ @cp js/*.js docs/assets/js/ @cp js/tests/vendor/jquery.js docs/assets/js/ - @echo "Compiling documentation... ${CHECK} Done" + @echo " ${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 js/bootstrap-affix.js > docs/assets/js/bootstrap.js @./node_modules/.bin/uglifyjs -nc docs/assets/js/bootstrap.js > docs/assets/js/bootstrap.min.tmp.js @echo "/**\n* Bootstrap.js v2.3.0 by @fat & @mdo\n* Copyright 2012 Twitter, Inc.\n* http://www.apache.org/licenses/LICENSE-2.0.txt\n*/" > docs/assets/js/copyright.js + @echo -n "Compiling and minifying javascript..." @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 " ${CHECK} Done" @echo "\n${HR}" @echo "Bootstrap successfully built at ${DATE}." @echo "${HR}\n" From 25803a966b07df24500dd74fc100c14656fb7d82 Mon Sep 17 00:00:00 2001 From: Nicolas Dudebout Date: Wed, 2 Jan 2013 05:42:59 -0500 Subject: [PATCH 2/8] Replaces some @echo recipes by @printf. The echo command does not understand the -n argument on Mac OS X. This is due to the fact that: - Makefile calls /bin/sh to execute a command - in Mac OS X, /bin/sh is a link to bash - in Mac OS X, bash is compiled with --enable-strict-posix-default Therefore, the echo command does not have the -n argument. printf on the other hand is a builtin function that works well on Mac OS X and Linux. --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index cb776a6bf0..eb7356d7da 100644 --- a/Makefile +++ b/Makefile @@ -13,14 +13,14 @@ build: @echo "\n${HR}" @echo "Building Bootstrap..." @echo "${HR}\n" - @echo -n "Running JSHint on javascript..." + @printf "Running JSHint on javascript..." @jshint js/*.js --config js/.jshintrc @jshint js/tests/unit/*.js --config js/.jshintrc @echo " ${CHECK} Done" - @echo -n "Compiling LESS with Recess..." + @printf "Compiling LESS with Recess..." @./node_modules/.bin/recess --compile ${BOOTSTRAP_LESS} > ${BOOTSTRAP} @echo " ${CHECK} Done" - @echo -n "Compiling documentation..." + @printf "Compiling documentation..." @node docs/build @cp fonts/* docs/assets/fonts/ @cp js/*.js docs/assets/js/ @@ -29,7 +29,7 @@ build: @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 js/bootstrap-affix.js > docs/assets/js/bootstrap.js @./node_modules/.bin/uglifyjs -nc docs/assets/js/bootstrap.js > docs/assets/js/bootstrap.min.tmp.js @echo "/**\n* Bootstrap.js v2.3.0 by @fat & @mdo\n* Copyright 2012 Twitter, Inc.\n* http://www.apache.org/licenses/LICENSE-2.0.txt\n*/" > docs/assets/js/copyright.js - @echo -n "Compiling and minifying javascript..." + @printf "Compiling and minifying javascript..." @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 " ${CHECK} Done" From 2a151d9e2f68d3658e90f08a23af15069a14d27e Mon Sep 17 00:00:00 2001 From: Nicolas Dudebout Date: Wed, 2 Jan 2013 05:59:55 -0500 Subject: [PATCH 3/8] Moves one @printf statement to be more accurate. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index eb7356d7da..75c5a56593 100644 --- a/Makefile +++ b/Makefile @@ -26,10 +26,10 @@ build: @cp js/*.js docs/assets/js/ @cp js/tests/vendor/jquery.js docs/assets/js/ @echo " ${CHECK} Done" + @printf "Compiling and minifying javascript..." @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 js/bootstrap-affix.js > docs/assets/js/bootstrap.js @./node_modules/.bin/uglifyjs -nc docs/assets/js/bootstrap.js > docs/assets/js/bootstrap.min.tmp.js @echo "/**\n* Bootstrap.js v2.3.0 by @fat & @mdo\n* Copyright 2012 Twitter, Inc.\n* http://www.apache.org/licenses/LICENSE-2.0.txt\n*/" > docs/assets/js/copyright.js - @printf "Compiling and minifying javascript..." @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 " ${CHECK} Done" From 10a83b1e6270cf5eb0bc7cefcbe700f16c7fd5ee Mon Sep 17 00:00:00 2001 From: Nicolas Dudebout Date: Wed, 2 Jan 2013 06:12:14 -0500 Subject: [PATCH 4/8] Modifies the Makefile to use local npm install **when available** The change introduced in 5bd8cdca9 was: - partial, as not all the command were translated - preventing the use of a global npm installation --- Makefile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 75c5a56593..743e0d7f51 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ BOOTSTRAP_LESS = ./less/bootstrap.less DATE=$(shell date +%I:%M%p) CHECK=\033[32m✔\033[39m HR=\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\# +PATH := ./node_modules/.bin:$(PATH) # @@ -18,7 +19,7 @@ build: @jshint js/tests/unit/*.js --config js/.jshintrc @echo " ${CHECK} Done" @printf "Compiling LESS with Recess..." - @./node_modules/.bin/recess --compile ${BOOTSTRAP_LESS} > ${BOOTSTRAP} + @recess --compile ${BOOTSTRAP_LESS} > ${BOOTSTRAP} @echo " ${CHECK} Done" @printf "Compiling documentation..." @node docs/build @@ -28,7 +29,7 @@ build: @echo " ${CHECK} Done" @printf "Compiling and minifying javascript..." @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 js/bootstrap-affix.js > docs/assets/js/bootstrap.js - @./node_modules/.bin/uglifyjs -nc docs/assets/js/bootstrap.js > docs/assets/js/bootstrap.min.tmp.js + @uglifyjs -nc docs/assets/js/bootstrap.js > docs/assets/js/bootstrap.min.tmp.js @echo "/**\n* Bootstrap.js v2.3.0 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 @@ -44,8 +45,8 @@ build: # test: - ./node_modules/.bin/jshint js/*.js --config js/.jshintrc - ./node_modules/.bin/jshint js/tests/unit/*.js --config js/.jshintrc + 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` @@ -74,7 +75,7 @@ bootstrap-js: bootstrap/js/*.js bootstrap/js/*.js: js/*.js mkdir -p bootstrap/js 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 js/bootstrap-affix.js > bootstrap/js/bootstrap.js - ./node_modules/.bin/uglifyjs -nc bootstrap/js/bootstrap.js > bootstrap/js/bootstrap.min.tmp.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 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 From 915ebf9f3001da3b818d358937955e32719e2251 Mon Sep 17 00:00:00 2001 From: Nicolas Dudebout Date: Wed, 2 Jan 2013 06:13:46 -0500 Subject: [PATCH 5/8] Allows the user to set different source and destination in Makefile. A user can use the following command to determine where to copy the resulting css file: $ BOOTSTRAP= make --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 743e0d7f51..f13150b037 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -BOOTSTRAP = ./docs/assets/css/bootstrap.css -BOOTSTRAP_LESS = ./less/bootstrap.less +BOOTSTRAP ?= ./docs/assets/css/bootstrap.css +BOOTSTRAP_LESS ?= ./less/bootstrap.less DATE=$(shell date +%I:%M%p) CHECK=\033[32m✔\033[39m HR=\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\# From 6512c5a5bccc80b1cfad84aa6b3efe267342fbba Mon Sep 17 00:00:00 2001 From: Nicolas Dudebout Date: Mon, 14 Jan 2013 09:02:25 -0500 Subject: [PATCH 6/8] Changes some more commands to use the local npm install. --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index f13150b037..19ddd3a29b 100644 --- a/Makefile +++ b/Makefile @@ -88,10 +88,10 @@ bootstrap-css: bootstrap/css/*.css bootstrap/css/*.css: less/*.less mkdir -p bootstrap/css - ./node_modules/.bin/recess --compile ${BOOTSTRAP_LESS} > bootstrap/css/bootstrap.css - ./node_modules/.bin/recess --compress ${BOOTSTRAP_LESS} > bootstrap/css/bootstrap.min.css - ./node_modules/.bin/recess --compile ${BOOTSTRAP_RESPONSIVE_LESS} > bootstrap/css/bootstrap-responsive.css - ./node_modules/.bin/recess --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 # # FONTS From 9134fa4eda2ce976a982d35b779c0849a9bd7c83 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 17 Feb 2013 16:56:57 -0800 Subject: [PATCH 7/8] correct version --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8beabf75fe..0c23405be9 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ build: @printf "Compiling and minifying javascript..." @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 js/bootstrap-affix.js > docs/assets/js/bootstrap.js @uglifyjs -nc docs/assets/js/bootstrap.js > docs/assets/js/bootstrap.min.tmp.js - @echo "/**\n* Bootstrap.js v2.3.0 by @fat & @mdo\n* Copyright 2012 Twitter, Inc.\n* http://www.apache.org/licenses/LICENSE-2.0.txt\n*/" > docs/assets/js/copyright.js + @echo "/**\n* Bootstrap.js v3.0.0 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 " ${CHECK} Done" From f59e4fdba32b99bdd4e6387f889dda4c9270f762 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 17 Feb 2013 16:58:43 -0800 Subject: [PATCH 8/8] remove duplicate done text; change label on docs prep step --- Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 0c23405be9..48aacdf08a 100644 --- a/Makefile +++ b/Makefile @@ -14,25 +14,25 @@ build: @echo "\n\n" @echo "\033[36mBuilding Bootstrap...\033[39m" @echo "${HR}" - @printf "Running JSHint on javascript..." + @printf "Running JSHint on JavaScript..." @jshint js/*.js --config js/.jshintrc @jshint js/tests/unit/*.js --config js/.jshintrc - @echo " ${CHECK} Done" + @echo " ${CHECK}" @printf "Compiling LESS with Recess..." @recess --compile ${BOOTSTRAP_LESS} > ${BOOTSTRAP} - @echo " ${CHECK} Done" - @printf "Prepping fonts and JavaScript..." + @echo " ${CHECK}" + @printf "Prepping documentation assets..." @cp fonts/* docs/assets/fonts/ @cp js/*.js docs/assets/js/ @cp js/tests/vendor/jquery.js docs/assets/js/ - @echo " ${CHECK} Done" - @printf "Compiling and minifying javascript..." + @echo " ${CHECK}" + @printf "Compiling and minifying JavaScript..." @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 js/bootstrap-affix.js > docs/assets/js/bootstrap.js @uglifyjs -nc docs/assets/js/bootstrap.js > docs/assets/js/bootstrap.min.tmp.js @echo "/**\n* Bootstrap.js v3.0.0 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 " ${CHECK} Done" + @echo " ${CHECK}" @echo "${HR}" @echo "\033[36mSuccess!\n\033[39m" @echo "\033[37mThanks for using Bootstrap,"