Skip to content

Commit e659dc7

Browse files
committed
Merge branch '2.0.3-wip'
Conflicts: Makefile docs/assets/js/bootstrap.js docs/assets/js/bootstrap.min.js
2 parents 6506ede + 839ef3a commit e659dc7

File tree

110 files changed

+6329
-2789
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+6329
-2789
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*.rej
77
*.swo
88
*.swp
9+
*.zip
910
*.vi
1011
*~
1112
*.sass-cache
@@ -31,4 +32,5 @@ nbproject
3132
.hg
3233
.svn
3334
.CVS
34-
.idea
35+
.idea
36+
node_modules

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
language: node_js
2+
node_js:
3+
- 0.6

Makefile

Lines changed: 53 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,51 +2,82 @@ BOOTSTRAP = ./docs/assets/css/bootstrap.css
22
BOOTSTRAP_LESS = ./less/bootstrap.less
33
BOOTSTRAP_RESPONSIVE = ./docs/assets/css/bootstrap-responsive.css
44
BOOTSTRAP_RESPONSIVE_LESS = ./less/responsive.less
5-
LESS_COMPRESSOR ?= `which lessc`
6-
WATCHR ?= `which watchr`
5+
DATE=$(shell date +%I:%M%p)
6+
CHECK=\033[32m✔\033[39m
7+
HR=\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#
8+
79

810
#
911
# BUILD DOCS
1012
#
1113

12-
docs: bootstrap
13-
rm docs/assets/bootstrap.zip
14-
zip -r docs/assets/bootstrap.zip bootstrap
15-
cp bootstrap/js/bootstrap.js docs/assets/js/bootstrap.js
16-
cp bootstrap/js/bootstrap.min.js docs/assets/js/bootstrap.min.js
17-
rm -r bootstrap
18-
lessc ${BOOTSTRAP_LESS} > ${BOOTSTRAP}
19-
lessc ${BOOTSTRAP_RESPONSIVE_LESS} > ${BOOTSTRAP_RESPONSIVE}
20-
node docs/build
21-
cp img/* docs/assets/img/
22-
cp js/*.js docs/assets/js/
23-
cp js/tests/vendor/jquery.js docs/assets/js/
14+
build:
15+
@echo "\n${HR}"
16+
@echo "Building Bootstrap..."
17+
@echo "${HR}\n"
18+
@jshint js/*.js --config js/.jshintrc
19+
@jshint js/tests/unit/*.js --config js/.jshintrc
20+
@echo "Running JSHint on javascript... ${CHECK} Done"
21+
@recess --compile ${BOOTSTRAP_LESS} > ${BOOTSTRAP}
22+
@recess --compile ${BOOTSTRAP_RESPONSIVE_LESS} > ${BOOTSTRAP_RESPONSIVE}
23+
@echo "Compiling LESS with Recess... ${CHECK} Done"
24+
@node docs/build
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 > docs/assets/js/bootstrap.js
30+
@uglifyjs -nc docs/assets/js/bootstrap.js > docs/assets/js/bootstrap.min.tmp.js
31+
@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
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"
35+
@echo "\n${HR}"
36+
@echo "Bootstrap successfully built at ${DATE}."
37+
@echo "${HR}\n"
38+
@echo "Thanks for using Bootstrap,"
39+
@echo "<3 @mdo and @fat\n"
40+
41+
#
42+
# RUN JSHINT & QUNIT TESTS IN PHANTOMJS
43+
#
44+
45+
test:
46+
jshint js/*.js --config js/.jshintrc
47+
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`
51+
rm js/tests/pid.txt
2452

2553
#
2654
# BUILD SIMPLE BOOTSTRAP DIRECTORY
27-
# lessc & uglifyjs are required
55+
# recess & uglifyjs are required
2856
#
2957

3058
bootstrap:
3159
mkdir -p bootstrap/img
3260
mkdir -p bootstrap/css
3361
mkdir -p bootstrap/js
3462
cp img/* bootstrap/img/
35-
lessc ${BOOTSTRAP_LESS} > bootstrap/css/bootstrap.css
36-
lessc --compress ${BOOTSTRAP_LESS} > bootstrap/css/bootstrap.min.css
37-
lessc ${BOOTSTRAP_RESPONSIVE_LESS} > bootstrap/css/bootstrap-responsive.css
38-
lessc --compress ${BOOTSTRAP_RESPONSIVE_LESS} > bootstrap/css/bootstrap-responsive.min.css
63+
recess --compile ${BOOTSTRAP_LESS} > bootstrap/css/bootstrap.css
64+
recess --compress ${BOOTSTRAP_LESS} > bootstrap/css/bootstrap.min.css
65+
recess --compile ${BOOTSTRAP_RESPONSIVE_LESS} > bootstrap/css/bootstrap-responsive.css
66+
recess --compress ${BOOTSTRAP_RESPONSIVE_LESS} > bootstrap/css/bootstrap-responsive.min.css
3967
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
4068
uglifyjs -nc bootstrap/js/bootstrap.js > bootstrap/js/bootstrap.min.tmp.js
41-
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
69+
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
4270
cat bootstrap/js/copyright.js bootstrap/js/bootstrap.min.tmp.js > bootstrap/js/bootstrap.min.js
4371
rm bootstrap/js/copyright.js bootstrap/js/bootstrap.min.tmp.js
4472

4573
#
4674
# MAKE FOR GH-PAGES 4 FAT & MDO ONLY (O_O )
4775
#
4876

49-
gh-pages: docs
77+
gh-pages: bootstrap docs
78+
rm -f docs/assets/bootstrap.zip
79+
zip -r docs/assets/bootstrap.zip bootstrap
80+
rm -r bootstrap
5081
rm -f ../bootstrap-gh-pages/assets/bootstrap.zip
5182
node docs/build production
5283
cp -r docs/* ../bootstrap-gh-pages
@@ -60,4 +91,4 @@ watch:
6091
watchr -e "watch('less/.*\.less') { system 'make' }"
6192

6293

63-
.PHONY: docs watch gh-pages
94+
.PHONY: docs watch gh-pages

README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[Twitter Bootstrap](http://twitter.github.com/bootstrap)
1+
[Twitter Bootstrap](http://twitter.github.com/bootstrap) [![Build Status](https://secure.travis-ci.org/twitter/bootstrap.png)](http://travis-ci.org/twitter/bootstrap)
22
=================
33

44
Bootstrap provides simple and flexible HTML, CSS, and Javascript for popular user interface components and interactions. In other words, it's a front-end toolkit for faster, more beautiful web development. It's created and maintained by [Mark Otto](http://twitter.com/mdo) and [Jacob Thornton](http://twitter.com/fat) at Twitter.
@@ -25,9 +25,9 @@ Releases will be numbered with the follow format:
2525

2626
And constructed with the following guidelines:
2727

28-
* Breaking backward compatibility bumps the major
29-
* New additions without breaking backward compatibility bumps the minor
30-
* Bug fixes and misc changes bump the patch
28+
* Breaking backward compatibility bumps the major (and resets the minor and patch)
29+
* New additions without breaking backward compatibility bumps the minor (and resets the patch)
30+
* Bug fixes and misc changes bumps the patch
3131

3232
For more information on SemVer, please visit http://semver.org/.
3333

@@ -81,8 +81,18 @@ Developers
8181

8282
We have included a makefile with convenience methods for working with the Bootstrap library.
8383

84+
+ **dependencies**
85+
Our makefile depends on you having recess, uglify.js, and jshint installed. To install, just run the following command in npm:
86+
87+
```
88+
$ npm install recess uglify-js jshint -g
89+
```
90+
8491
+ **build** - `make`
85-
Runs the LESS compiler to rebuild the `/less` files and compiles the docs pages. Requires lessc and uglify-js. <a href="http://twitter.github.com/bootstrap/less.html#compiling">Read more in our docs &raquo;</a>
92+
Runs the recess compiler to rebuild the `/less` files and compiles the docs pages. Requires recess and uglify-js. <a href="http://twitter.github.com/bootstrap/less.html#compiling">Read more in our docs &raquo;</a>
93+
94+
+ **test** - `make test`
95+
Runs jshint and qunit tests headlessly in phantom js (used for ci). Depends on having phatomjs installed.
8696

8797
+ **watch** - `make watch`
8898
This is a convenience method for watching just Less files and automatically building them whenever you save. Requires the Watchr gem.

docs/assets/bootstrap.zip

-54.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)