Skip to content

Commit 0e329a8

Browse files
author
Bill Edgington
committed
Merge remote-tracking branch 'upstream/master'
* upstream/master: (298 commits) add ie-emulation-modes-warning.js to docs & examples Minor Spacing fixes Run `grunt`. Update holder.js to v2.3.2. Update JSZip to v2.2.1. Carousel.slide: rename e => slideEvent change 'slid' comments per @fat's feedback Document that @import-ing Bootstrap can break the icon font path fix twbs#13427 add IE warning scripts to linter config remove semicolons :'-( add script to warn folks trying to test old IE using IE's unreliable emulation modes Document .direction & .relatedTarget properties of Carousel events. Fixes twbs#13395 Add direction & relatedTarget properties to slid.bs.carousel event Fixes #13393 document that show-ing a tooltip/popover on a hidden element doesn't work; fixes twbs#13362 README: Authors => Creators the master branch is the relevant one for current build status Add missing word. fixes twbs#13157 - Collapse plugin - issues with transition end event bubbling document that non-:visible scrollspy targets are ignored; fixes twbs#13394 ... Conflicts: dist/css/bootstrap-theme.css dist/css/bootstrap-theme.min.css dist/css/bootstrap.css.map dist/css/bootstrap.min.css less/variables.less
2 parents d0ce626 + 2c1fe53 commit 0e329a8

File tree

251 files changed

+14130
-11517
lines changed

Some content is hidden

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

251 files changed

+14130
-11517
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@
55
*.json text eol=lf
66
*.less text eol=lf
77
*.md text eol=lf
8+
*.svg text eol=lf
89
*.yml text eol=lf

.travis.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,18 @@ node_js:
44
before_install:
55
- time sudo pip install --use-mirrors -r test-infra/requirements.txt
66
- rvm use 1.9.3 --fuzzy
7-
- if [ "$TWBS_TEST" = validate-html ]; then echo "ruby=$(basename $(rvm gemdir)) jekyll=$JEKYLL_VERSION" > pseudo_Gemfile.lock; fi
7+
- export GEMDIR=$(rvm gemdir)
8+
- if [ "$TWBS_TEST" = validate-html ]; then echo "ruby=$(basename $GEMDIR) jekyll=$JEKYLL_VERSION" > pseudo_Gemfile.lock; fi
89
install:
910
- time npm install -g grunt-cli
10-
- time ./test-infra/s3_cache.py download 'npm packages' test-infra/npm-shrinkwrap.canonical.json ./node_modules || time ./test-infra/uncached-npm-install.sh
11-
- if [ "$TWBS_TEST" = validate-html ]; then time ./test-infra/s3_cache.py download rubygems pseudo_Gemfile.lock $(rvm gemdir) || gem install -N jekyll -v $JEKYLL_VERSION; fi
11+
- ./test-infra/s3_cache.py download npm-modules
12+
- if [ "$TWBS_TEST" = validate-html ]; then ./test-infra/s3_cache.py download rubygems; fi
1213
after_script:
13-
- if [ "$TWBS_TEST" = core ]; then time ./test-infra/s3_cache.py upload 'npm packages' test-infra/npm-shrinkwrap.canonical.json ./node_modules; fi
14-
- if [ "$TWBS_TEST" = validate-html ]; then time ./test-infra/s3_cache.py upload rubygems pseudo_Gemfile.lock $(rvm gemdir); fi
14+
- if [ "$TWBS_TEST" = core ]; then ./test-infra/s3_cache.py upload npm-modules; fi
15+
- if [ "$TWBS_TEST" = validate-html ]; then ./test-infra/s3_cache.py upload rubygems; fi
1516
env:
1617
global:
17-
- JEKYLL_VERSION: 1.4.1
18+
- JEKYLL_VERSION: 1.5.0
1819
- SAUCE_USERNAME: bootstrap
1920
- secure: "pJkBwnuae9dKU5tEcCqccfS1QQw7/meEcfz63fM7ba7QJNjoA6BaXj08L5Z3Vb5vBmVPwBawxo5Hp0jC0r/Z/O0hGnAmz/Cz09L+cy7dSAZ9x4hvZePSja/UAusaB5ogMoO8l2b773MzgQeSmrLbExr9BWLeqEfjC2hFgdgHLaQ="
2021
- secure: "gqjqISbxBJK6byFbsmr1AyP1qoWH+rap06A2gI7v72+Tn2PU2nYkIMUkCvhZw6K889jv+LhQ/ybcBxDOXHpNCExCnSgB4dcnmYp+9oeNZb37jSP0rQ+Ib4OTLjzc3/FawE/fUq5kukZTC7porzc/k0qJNLAZRx3YLALmK1GIdUY="

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ license your work under the terms of the [MIT License](LICENSE.md).
169169
- Always a space after a property's colon (e.g., `display: block;` and not `display:block;`).
170170
- End all lines with a semi-colon.
171171
- For multiple, comma-separated selectors, place each selector on its own line.
172+
- Don't add vendor prefixed properties to their unprefixed counterparts (e.g., only `box-sizing` and not also include `-webkit-box-sizing`), as this is done automagically at build time.
172173
- Attribute selectors, like `input[type="text"]` should always wrap the attribute's value in double quotes, for consistency and safety (see this [blog post on unquoted attribute values](http://mathiasbynens.be/notes/unquoted-attribute-values) that can lead to XSS attacks).
173174
- Attribute selectors should only be used where absolutely necessary (e.g., form controls) and should be avoided on custom components for performance and explicitness.
174175
- Series of classes for a component should include a base class (e.g., `.component`) and use the base class as a prefix for modifier and sub-components (e.g., `.component-lg`).

Gruntfile.js

Lines changed: 96 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module.exports = function (grunt) {
1919
var path = require('path');
2020
var generateGlyphiconsData = require('./grunt/bs-glyphicons-data-generator.js');
2121
var BsLessdocParser = require('./grunt/bs-lessdoc-parser.js');
22-
var generateRawFilesJs = require('./grunt/bs-raw-files-generator.js');
22+
var generateRawFiles = require('./grunt/bs-raw-files-generator.js');
2323
var updateShrinkwrap = require('./grunt/shrinkwrap.js');
2424

2525
// Project configuration.
@@ -56,7 +56,7 @@ module.exports = function (grunt) {
5656
src: 'js/tests/unit/*.js'
5757
},
5858
assets: {
59-
src: ['docs/assets/js/application.js', 'docs/assets/js/customizer.js']
59+
src: ['docs/assets/js/_src/*.js', 'docs/assets/js/*.js', '!docs/assets/js/*.min.js']
6060
}
6161
},
6262

@@ -66,7 +66,8 @@ module.exports = function (grunt) {
6666
},
6767
grunt: {
6868
options: {
69-
'requireParenthesesAroundIIFE': true
69+
requireCamelCaseOrUpperCaseIdentifiers: null,
70+
requireParenthesesAroundIIFE: true
7071
},
7172
src: '<%= jshint.grunt.src %>'
7273
},
@@ -77,27 +78,10 @@ module.exports = function (grunt) {
7778
src: '<%= jshint.test.src %>'
7879
},
7980
assets: {
80-
src: '<%= jshint.assets.src %>'
81-
}
82-
},
83-
84-
csslint: {
85-
options: {
86-
csslintrc: 'less/.csslintrc'
87-
},
88-
src: [
89-
'dist/css/bootstrap.css',
90-
'dist/css/bootstrap-theme.css'
91-
],
92-
examples: [
93-
'docs/examples/**/*.css'
94-
],
95-
docs: {
9681
options: {
97-
'ids': false,
98-
'overqualified-elements': false
82+
requireCamelCaseOrUpperCaseIdentifiers: null
9983
},
100-
src: ['docs/assets/css/docs.css']
84+
src: '<%= jshint.assets.src %>'
10185
}
10286
},
10387

@@ -126,9 +110,6 @@ module.exports = function (grunt) {
126110
},
127111

128112
uglify: {
129-
options: {
130-
report: 'min'
131-
},
132113
bootstrap: {
133114
options: {
134115
banner: '<%= banner %>'
@@ -141,13 +122,13 @@ module.exports = function (grunt) {
141122
preserveComments: 'some'
142123
},
143124
src: [
144-
'docs/assets/js/vendor/less.min.js',
145-
'docs/assets/js/vendor/jszip.min.js',
146-
'docs/assets/js/vendor/uglify.min.js',
147-
'docs/assets/js/vendor/blob.js',
148-
'docs/assets/js/vendor/filesaver.js',
125+
'docs/assets/js/_vendor/less.min.js',
126+
'docs/assets/js/_vendor/jszip.min.js',
127+
'docs/assets/js/_vendor/uglify.min.js',
128+
'docs/assets/js/_vendor/blob.js',
129+
'docs/assets/js/_vendor/filesaver.js',
149130
'docs/assets/js/raw-files.min.js',
150-
'docs/assets/js/customizer.js'
131+
'docs/assets/js/_src/customizer.js'
151132
],
152133
dest: 'docs/assets/js/customize.min.js'
153134
},
@@ -156,13 +137,20 @@ module.exports = function (grunt) {
156137
preserveComments: 'some'
157138
},
158139
src: [
159-
'docs/assets/js/vendor/holder.js',
160-
'docs/assets/js/application.js'
140+
'docs/assets/js/_vendor/holder.js',
141+
'docs/assets/js/_src/application.js'
161142
],
162143
dest: 'docs/assets/js/docs.min.js'
163144
}
164145
},
165146

147+
qunit: {
148+
options: {
149+
inject: 'js/tests/unit/phantom.js'
150+
},
151+
files: 'js/tests/index.html'
152+
},
153+
166154
less: {
167155
compileCore: {
168156
options: {
@@ -190,8 +178,7 @@ module.exports = function (grunt) {
190178
},
191179
minify: {
192180
options: {
193-
cleancss: true,
194-
report: 'min'
181+
cleancss: true
195182
},
196183
files: {
197184
'dist/css/<%= pkg.name %>.min.css': 'dist/css/<%= pkg.name %>.css',
@@ -201,46 +188,83 @@ module.exports = function (grunt) {
201188
}
202189
},
203190

204-
cssFlip: {
191+
autoprefixer: {
192+
options: {
193+
browsers: ['last 2 versions', 'ie 8', 'ie 9', 'android 2.3', 'android 4', 'opera 12']
194+
},
195+
core: {
196+
options: {
197+
map: true
198+
},
199+
src: 'dist/css/<%= pkg.name %>.css'
200+
},
201+
theme: {
202+
options: {
203+
map: true
204+
},
205+
src: 'dist/css/<%= pkg.name %>-theme.css'
206+
},
207+
docs: {
208+
src: 'docs/assets/css/_src/docs.css'
209+
},
210+
examples: {
211+
expand: true,
212+
cwd: 'docs/examples/',
213+
src: ['**/*.css'],
214+
dest: 'docs/examples/'
215+
}
216+
},
217+
218+
cssflip: {
205219
rtl: {
206220
files: {
207221
'dist/css/<%= pkg.name %>-rtl.css': 'dist/css/<%= pkg.name %>.css'
208222
}
209223
}
210224
},
211225

212-
cssmin: {
213-
compress: {
226+
csslint: {
227+
options: {
228+
csslintrc: 'less/.csslintrc'
229+
},
230+
src: [
231+
'dist/css/bootstrap.css',
232+
'dist/css/bootstrap-theme.css'
233+
],
234+
examples: [
235+
'docs/examples/**/*.css'
236+
],
237+
docs: {
214238
options: {
215-
keepSpecialComments: '*',
216-
noAdvanced: true, // turn advanced optimizations off until the issue is fixed in clean-css
217-
report: 'min',
218-
compatibility: 'ie8'
239+
ids: false,
240+
'overqualified-elements': false
219241
},
242+
src: 'docs/assets/css/_src/docs.css'
243+
}
244+
},
245+
246+
cssmin: {
247+
options: {
248+
compatibility: 'ie8',
249+
keepSpecialComments: '*',
250+
noAdvanced: true // turn advanced optimizations off until the issue is fixed in clean-css
251+
},
252+
docs: {
220253
src: [
221-
'docs/assets/css/docs.css',
222-
'docs/assets/css/pygments-manni.css'
254+
'docs/assets/css/_src/docs.css',
255+
'docs/assets/css/_src/pygments-manni.css'
223256
],
224257
dest: 'docs/assets/css/docs.min.css'
225258
}
226259
},
227260

228261
usebanner: {
229-
dist: {
230-
options: {
231-
position: 'top',
232-
banner: '<%= banner %>'
233-
},
234-
files: {
235-
src: [
236-
'dist/css/<%= pkg.name %>.css',
237-
'dist/css/<%= pkg.name %>-rtl.css',
238-
'dist/css/<%= pkg.name %>.min.css',
239-
'dist/css/<%= pkg.name %>-rtl.min.css',
240-
'dist/css/<%= pkg.name %>-theme.css',
241-
'dist/css/<%= pkg.name %>-theme.min.css'
242-
]
243-
}
262+
options: {
263+
position: 'top',
264+
banner: '<%= banner %>'
265+
},
266+
files: {
267+
src: 'dist/css/*.css'
244268
}
245269
},
246270

@@ -249,21 +273,20 @@ module.exports = function (grunt) {
249273
config: 'less/.csscomb.json'
250274
},
251275
dist: {
252-
files: {
253-
'dist/css/<%= pkg.name %>.css': 'dist/css/<%= pkg.name %>.css',
254-
'dist/css/<%= pkg.name %>-rtl.css': 'dist/css/<%= pkg.name %>-rtl.css',
255-
'dist/css/<%= pkg.name %>-theme.css': 'dist/css/<%= pkg.name %>-theme.css'
256-
}
276+
expand: true,
277+
cwd: 'dist/css/',
278+
src: ['*.css', '!*.min.css'],
279+
dest: 'dist/css/'
257280
},
258281
examples: {
259282
expand: true,
260283
cwd: 'docs/examples/',
261-
src: ['**/*.css'],
284+
src: '**/*.css',
262285
dest: 'docs/examples/'
263286
},
264287
docs: {
265288
files: {
266-
'docs/assets/css/docs.css': 'docs/assets/css/docs.css'
289+
'docs/assets/css/_src/docs.css': 'docs/assets/css/_src/docs.css'
267290
}
268291
}
269292
},
@@ -286,13 +309,6 @@ module.exports = function (grunt) {
286309
}
287310
},
288311

289-
qunit: {
290-
options: {
291-
inject: 'js/tests/unit/phantom.js'
292-
},
293-
files: 'js/tests/index.html'
294-
},
295-
296312
connect: {
297313
server: {
298314
options: {
@@ -318,8 +334,8 @@ module.exports = function (grunt) {
318334
}
319335
},
320336
files: {
321-
'docs/_includes/customizer-variables.html': 'docs/jade/customizer-variables.jade',
322-
'docs/_includes/nav-customize.html': 'docs/jade/customizer-nav.jade'
337+
'docs/_includes/customizer-variables.html': 'docs/_jade/customizer-variables.jade',
338+
'docs/_includes/nav/customize.html': 'docs/_jade/customizer-nav.jade'
323339
}
324340
}
325341
},
@@ -372,7 +388,7 @@ module.exports = function (grunt) {
372388
build: process.env.TRAVIS_JOB_ID,
373389
concurrency: 10,
374390
urls: ['http://127.0.0.1:3000/js/tests/index.html'],
375-
browsers: grunt.file.readYAML('test-infra/sauce_browsers.yml')
391+
browsers: grunt.file.readYAML('grunt/sauce_browsers.yml')
376392
}
377393
}
378394
},
@@ -390,7 +406,7 @@ module.exports = function (grunt) {
390406

391407
// These plugins provide necessary tasks.
392408
require('load-grunt-tasks')(grunt, {scope: 'devDependencies'});
393-
grunt.loadTasks('./grunt/tasks/');
409+
require('time-grunt')(grunt);
394410

395411
// Docs HTML validation task
396412
grunt.registerTask('validate-html', ['jekyll', 'validation']);
@@ -419,7 +435,7 @@ module.exports = function (grunt) {
419435

420436
// CSS distribution task.
421437
grunt.registerTask('less-compile', ['less:compileCore', 'less:compileTheme']);
422-
grunt.registerTask('dist-css', ['less-compile', 'cssFlip', 'less:minify', 'cssmin', 'csscomb', 'usebanner']);
438+
grunt.registerTask('dist-css', ['less-compile', 'autoprefixer', 'cssflip', 'usebanner', 'csscomb', 'less:minify', 'cssmin']);
423439

424440
// Docs distribution task.
425441
grunt.registerTask('dist-docs', 'copy:docs');
@@ -435,14 +451,14 @@ module.exports = function (grunt) {
435451
// This can be overzealous, so its changes should always be manually reviewed!
436452
grunt.registerTask('change-version-number', 'sed');
437453

438-
grunt.registerTask('build-glyphicons-data', generateGlyphiconsData);
454+
grunt.registerTask('build-glyphicons-data', function () { generateGlyphiconsData.call(this, grunt); });
439455

440456
// task for building customizer
441457
grunt.registerTask('build-customizer', ['build-customizer-html', 'build-raw-files']);
442458
grunt.registerTask('build-customizer-html', 'jade');
443459
grunt.registerTask('build-raw-files', 'Add scripts/less files to customizer.', function () {
444460
var banner = grunt.template.process('<%= banner %>');
445-
generateRawFilesJs(banner);
461+
generateRawFiles(grunt, banner);
446462
});
447463

448464
// Task for updating the npm packages used by the Travis build.

0 commit comments

Comments
 (0)