From 10a83b1e6270cf5eb0bc7cefcbe700f16c7fd5ee Mon Sep 17 00:00:00 2001 From: Nicolas Dudebout Date: Wed, 2 Jan 2013 06:12:14 -0500 Subject: [PATCH] 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