1 BOOTSTRAP = ./docs/assets/css/bootstrap.css
2 BOOTSTRAP_LESS = ./less/bootstrap.less
3 BOOTSTRAP_RESPONSIVE = ./docs/assets/css/bootstrap-responsive.css
4 BOOTSTRAP_RESPONSIVE_LESS = ./less/responsive.less
5 DATE=$(shell date +%I:%M%p)
6 CHECK=\033[32m✔\033[39m
7 HR=\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#
16 @echo "Building Bootstrap..."
18 @./node_modules/.bin/jshint js/*.js --config js/.jshintrc
19 @./node_modules/.bin/jshint js/tests/unit/*.js --config js/.jshintrc
20 @echo "Running JSHint on javascript... ${CHECK} Done"
21 @./node_modules/.bin/recess --compile ${BOOTSTRAP_LESS} > ${BOOTSTRAP}
22 @./node_modules/.bin/recess --compile ${BOOTSTRAP_RESPONSIVE_LESS} > ${BOOTSTRAP_RESPONSIVE}
23 @echo "Compiling LESS with Recess... ${CHECK} Done"
25 @cp img/* docs/assets/img/
26 @cp js/*.js docs/assets/js/
27 @cp js/tests/vendor/jquery.js docs/assets/js/
28 @echo "Compiling documentation... ${CHECK} Done"
29 @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
30 @./node_modules/.bin/uglifyjs -nc docs/assets/js/bootstrap.js > docs/assets/js/bootstrap.min.tmp.js
31 @echo "/**\n* Bootstrap.js v2.3.2 by @fat & @mdo\n* Copyright 2013 Twitter, Inc.\n* http://www.apache.org/licenses/LICENSE-2.0.txt\n*/" > docs/assets/js/copyright.js
32 @cat docs/assets/js/copyright.js docs/assets/js/bootstrap.min.tmp.js > docs/assets/js/bootstrap.min.js
33 @rm docs/assets/js/copyright.js docs/assets/js/bootstrap.min.tmp.js
34 @echo "Compiling and minifying javascript... ${CHECK} Done"
36 @echo "Bootstrap successfully built at ${DATE}."
38 @echo "Thanks for using Bootstrap,"
39 @echo "<3 @mdo and @fat\n"
42 # RUN JSHINT & QUNIT TESTS IN PHANTOMJS
46 ./node_modules/.bin/jshint js/*.js --config js/.jshintrc
47 ./node_modules/.bin/jshint js/tests/unit/*.js --config js/.jshintrc
48 node js/tests/server.js &
49 phantomjs js/tests/phantom.js "http://localhost:3000/js/tests"
50 kill -9 `cat js/tests/pid.txt`
54 # CLEANS THE ROOT DIRECTORY OF PRIOR BUILDS
61 # BUILD SIMPLE BOOTSTRAP DIRECTORY
62 # recess & uglifyjs are required
65 bootstrap: bootstrap-img bootstrap-css bootstrap-js
71 bootstrap-js: bootstrap/js/*.js
73 bootstrap/js/*.js: js/*.js
75 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
76 ./node_modules/.bin/uglifyjs -nc bootstrap/js/bootstrap.js > bootstrap/js/bootstrap.min.tmp.js
77 echo "/*!\n* Bootstrap.js by @fat & @mdo\n* Copyright 2013 Twitter, Inc.\n* http://www.apache.org/licenses/LICENSE-2.0.txt\n*/" > bootstrap/js/copyright.js
78 cat bootstrap/js/copyright.js bootstrap/js/bootstrap.min.tmp.js > bootstrap/js/bootstrap.min.js
79 rm bootstrap/js/copyright.js bootstrap/js/bootstrap.min.tmp.js
85 bootstrap-css: bootstrap/css/*.css
87 bootstrap/css/*.css: less/*.less
88 mkdir -p bootstrap/css
89 ./node_modules/.bin/recess --compile ${BOOTSTRAP_LESS} > bootstrap/css/bootstrap.css
90 ./node_modules/.bin/recess --compress ${BOOTSTRAP_LESS} > bootstrap/css/bootstrap.min.css
91 ./node_modules/.bin/recess --compile ${BOOTSTRAP_RESPONSIVE_LESS} > bootstrap/css/bootstrap-responsive.css
92 ./node_modules/.bin/recess --compress ${BOOTSTRAP_RESPONSIVE_LESS} > bootstrap/css/bootstrap-responsive.min.css
98 bootstrap-img: bootstrap/img/*
100 bootstrap/img/*: img/*
101 mkdir -p bootstrap/img
102 cp img/* bootstrap/img/
106 # MAKE FOR GH-PAGES 4 FAT & MDO ONLY (O_O )
109 gh-pages: bootstrap docs
110 rm -f docs/assets/bootstrap.zip
111 zip -r docs/assets/bootstrap.zip bootstrap
113 rm -f ../bootstrap-gh-pages/assets/bootstrap.zip
114 node docs/build production
115 cp -r docs/* ../bootstrap-gh-pages
122 echo "Watching less files..."; \
123 watchr -e "watch('less/.*\.less') { system 'make' }"
126 .PHONY: docs watch gh-pages bootstrap-img bootstrap-css bootstrap-js