]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Modifies the Makefile to use local npm install **when available**
authorNicolas Dudebout <nicolas.dudebout@gatech.edu>
Wed, 2 Jan 2013 11:12:14 +0000 (06:12 -0500)
committerNicolas Dudebout <nicolas.dudebout@gatech.edu>
Mon, 14 Jan 2013 14:01:19 +0000 (09:01 -0500)
The change introduced in 5bd8cdca9 was:

  - partial, as not all the command were translated
  - preventing the use of a global npm installation

Makefile

index 75c5a5659348d66d4ea0fb7f98b2f14d6f063255..743e0d7f517e9718c21be979c5587a455e5b7cf9 100644 (file)
--- 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