Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Bill Edgington committed Apr 30, 2014
2 parents d0ce626 + 2c1fe53 commit 0e329a8
Show file tree
Hide file tree
Showing 251 changed files with 14,130 additions and 11,517 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
*.json text eol=lf
*.less text eol=lf
*.md text eol=lf
*.svg text eol=lf
*.yml text eol=lf
13 changes: 7 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@ node_js:
before_install:
- time sudo pip install --use-mirrors -r test-infra/requirements.txt
- rvm use 1.9.3 --fuzzy
- if [ "$TWBS_TEST" = validate-html ]; then echo "ruby=$(basename $(rvm gemdir)) jekyll=$JEKYLL_VERSION" > pseudo_Gemfile.lock; fi
- export GEMDIR=$(rvm gemdir)
- if [ "$TWBS_TEST" = validate-html ]; then echo "ruby=$(basename $GEMDIR) jekyll=$JEKYLL_VERSION" > pseudo_Gemfile.lock; fi
install:
- time npm install -g grunt-cli
- time ./test-infra/s3_cache.py download 'npm packages' test-infra/npm-shrinkwrap.canonical.json ./node_modules || time ./test-infra/uncached-npm-install.sh
- 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
- ./test-infra/s3_cache.py download npm-modules
- if [ "$TWBS_TEST" = validate-html ]; then ./test-infra/s3_cache.py download rubygems; fi
after_script:
- if [ "$TWBS_TEST" = core ]; then time ./test-infra/s3_cache.py upload 'npm packages' test-infra/npm-shrinkwrap.canonical.json ./node_modules; fi
- if [ "$TWBS_TEST" = validate-html ]; then time ./test-infra/s3_cache.py upload rubygems pseudo_Gemfile.lock $(rvm gemdir); fi
- if [ "$TWBS_TEST" = core ]; then ./test-infra/s3_cache.py upload npm-modules; fi
- if [ "$TWBS_TEST" = validate-html ]; then ./test-infra/s3_cache.py upload rubygems; fi
env:
global:
- JEKYLL_VERSION: 1.4.1
- JEKYLL_VERSION: 1.5.0
- SAUCE_USERNAME: bootstrap
- secure: "pJkBwnuae9dKU5tEcCqccfS1QQw7/meEcfz63fM7ba7QJNjoA6BaXj08L5Z3Vb5vBmVPwBawxo5Hp0jC0r/Z/O0hGnAmz/Cz09L+cy7dSAZ9x4hvZePSja/UAusaB5ogMoO8l2b773MzgQeSmrLbExr9BWLeqEfjC2hFgdgHLaQ="
- secure: "gqjqISbxBJK6byFbsmr1AyP1qoWH+rap06A2gI7v72+Tn2PU2nYkIMUkCvhZw6K889jv+LhQ/ybcBxDOXHpNCExCnSgB4dcnmYp+9oeNZb37jSP0rQ+Ib4OTLjzc3/FawE/fUq5kukZTC7porzc/k0qJNLAZRx3YLALmK1GIdUY="
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ license your work under the terms of the [MIT License](LICENSE.md).
- Always a space after a property's colon (e.g., `display: block;` and not `display:block;`).
- End all lines with a semi-colon.
- For multiple, comma-separated selectors, place each selector on its own line.
- 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.
- 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).
- Attribute selectors should only be used where absolutely necessary (e.g., form controls) and should be avoided on custom components for performance and explicitness.
- 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`).
Expand Down
176 changes: 96 additions & 80 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = function (grunt) {
var path = require('path');
var generateGlyphiconsData = require('./grunt/bs-glyphicons-data-generator.js');
var BsLessdocParser = require('./grunt/bs-lessdoc-parser.js');
var generateRawFilesJs = require('./grunt/bs-raw-files-generator.js');
var generateRawFiles = require('./grunt/bs-raw-files-generator.js');
var updateShrinkwrap = require('./grunt/shrinkwrap.js');

// Project configuration.
Expand Down Expand Up @@ -56,7 +56,7 @@ module.exports = function (grunt) {
src: 'js/tests/unit/*.js'
},
assets: {
src: ['docs/assets/js/application.js', 'docs/assets/js/customizer.js']
src: ['docs/assets/js/_src/*.js', 'docs/assets/js/*.js', '!docs/assets/js/*.min.js']
}
},

Expand All @@ -66,7 +66,8 @@ module.exports = function (grunt) {
},
grunt: {
options: {
'requireParenthesesAroundIIFE': true
requireCamelCaseOrUpperCaseIdentifiers: null,
requireParenthesesAroundIIFE: true
},
src: '<%= jshint.grunt.src %>'
},
Expand All @@ -77,27 +78,10 @@ module.exports = function (grunt) {
src: '<%= jshint.test.src %>'
},
assets: {
src: '<%= jshint.assets.src %>'
}
},

csslint: {
options: {
csslintrc: 'less/.csslintrc'
},
src: [
'dist/css/bootstrap.css',
'dist/css/bootstrap-theme.css'
],
examples: [
'docs/examples/**/*.css'
],
docs: {
options: {
'ids': false,
'overqualified-elements': false
requireCamelCaseOrUpperCaseIdentifiers: null
},
src: ['docs/assets/css/docs.css']
src: '<%= jshint.assets.src %>'
}
},

Expand Down Expand Up @@ -126,9 +110,6 @@ module.exports = function (grunt) {
},

uglify: {
options: {
report: 'min'
},
bootstrap: {
options: {
banner: '<%= banner %>'
Expand All @@ -141,13 +122,13 @@ module.exports = function (grunt) {
preserveComments: 'some'
},
src: [
'docs/assets/js/vendor/less.min.js',
'docs/assets/js/vendor/jszip.min.js',
'docs/assets/js/vendor/uglify.min.js',
'docs/assets/js/vendor/blob.js',
'docs/assets/js/vendor/filesaver.js',
'docs/assets/js/_vendor/less.min.js',
'docs/assets/js/_vendor/jszip.min.js',
'docs/assets/js/_vendor/uglify.min.js',
'docs/assets/js/_vendor/blob.js',
'docs/assets/js/_vendor/filesaver.js',
'docs/assets/js/raw-files.min.js',
'docs/assets/js/customizer.js'
'docs/assets/js/_src/customizer.js'
],
dest: 'docs/assets/js/customize.min.js'
},
Expand All @@ -156,13 +137,20 @@ module.exports = function (grunt) {
preserveComments: 'some'
},
src: [
'docs/assets/js/vendor/holder.js',
'docs/assets/js/application.js'
'docs/assets/js/_vendor/holder.js',
'docs/assets/js/_src/application.js'
],
dest: 'docs/assets/js/docs.min.js'
}
},

qunit: {
options: {
inject: 'js/tests/unit/phantom.js'
},
files: 'js/tests/index.html'
},

less: {
compileCore: {
options: {
Expand Down Expand Up @@ -190,8 +178,7 @@ module.exports = function (grunt) {
},
minify: {
options: {
cleancss: true,
report: 'min'
cleancss: true
},
files: {
'dist/css/<%= pkg.name %>.min.css': 'dist/css/<%= pkg.name %>.css',
Expand All @@ -201,46 +188,83 @@ module.exports = function (grunt) {
}
},

cssFlip: {
autoprefixer: {
options: {
browsers: ['last 2 versions', 'ie 8', 'ie 9', 'android 2.3', 'android 4', 'opera 12']
},
core: {
options: {
map: true
},
src: 'dist/css/<%= pkg.name %>.css'
},
theme: {
options: {
map: true
},
src: 'dist/css/<%= pkg.name %>-theme.css'
},
docs: {
src: 'docs/assets/css/_src/docs.css'
},
examples: {
expand: true,
cwd: 'docs/examples/',
src: ['**/*.css'],
dest: 'docs/examples/'
}
},

cssflip: {
rtl: {
files: {
'dist/css/<%= pkg.name %>-rtl.css': 'dist/css/<%= pkg.name %>.css'
}
}
},

cssmin: {
compress: {
csslint: {
options: {
csslintrc: 'less/.csslintrc'
},
src: [
'dist/css/bootstrap.css',
'dist/css/bootstrap-theme.css'
],
examples: [
'docs/examples/**/*.css'
],
docs: {
options: {
keepSpecialComments: '*',
noAdvanced: true, // turn advanced optimizations off until the issue is fixed in clean-css
report: 'min',
compatibility: 'ie8'
ids: false,
'overqualified-elements': false
},
src: 'docs/assets/css/_src/docs.css'
}
},

cssmin: {
options: {
compatibility: 'ie8',
keepSpecialComments: '*',
noAdvanced: true // turn advanced optimizations off until the issue is fixed in clean-css
},
docs: {
src: [
'docs/assets/css/docs.css',
'docs/assets/css/pygments-manni.css'
'docs/assets/css/_src/docs.css',
'docs/assets/css/_src/pygments-manni.css'
],
dest: 'docs/assets/css/docs.min.css'
}
},

usebanner: {
dist: {
options: {
position: 'top',
banner: '<%= banner %>'
},
files: {
src: [
'dist/css/<%= pkg.name %>.css',
'dist/css/<%= pkg.name %>-rtl.css',
'dist/css/<%= pkg.name %>.min.css',
'dist/css/<%= pkg.name %>-rtl.min.css',
'dist/css/<%= pkg.name %>-theme.css',
'dist/css/<%= pkg.name %>-theme.min.css'
]
}
options: {
position: 'top',
banner: '<%= banner %>'
},
files: {
src: 'dist/css/*.css'
}
},

Expand All @@ -249,21 +273,20 @@ module.exports = function (grunt) {
config: 'less/.csscomb.json'
},
dist: {
files: {
'dist/css/<%= pkg.name %>.css': 'dist/css/<%= pkg.name %>.css',
'dist/css/<%= pkg.name %>-rtl.css': 'dist/css/<%= pkg.name %>-rtl.css',
'dist/css/<%= pkg.name %>-theme.css': 'dist/css/<%= pkg.name %>-theme.css'
}
expand: true,
cwd: 'dist/css/',
src: ['*.css', '!*.min.css'],
dest: 'dist/css/'
},
examples: {
expand: true,
cwd: 'docs/examples/',
src: ['**/*.css'],
src: '**/*.css',
dest: 'docs/examples/'
},
docs: {
files: {
'docs/assets/css/docs.css': 'docs/assets/css/docs.css'
'docs/assets/css/_src/docs.css': 'docs/assets/css/_src/docs.css'
}
}
},
Expand All @@ -286,13 +309,6 @@ module.exports = function (grunt) {
}
},

qunit: {
options: {
inject: 'js/tests/unit/phantom.js'
},
files: 'js/tests/index.html'
},

connect: {
server: {
options: {
Expand All @@ -318,8 +334,8 @@ module.exports = function (grunt) {
}
},
files: {
'docs/_includes/customizer-variables.html': 'docs/jade/customizer-variables.jade',
'docs/_includes/nav-customize.html': 'docs/jade/customizer-nav.jade'
'docs/_includes/customizer-variables.html': 'docs/_jade/customizer-variables.jade',
'docs/_includes/nav/customize.html': 'docs/_jade/customizer-nav.jade'
}
}
},
Expand Down Expand Up @@ -372,7 +388,7 @@ module.exports = function (grunt) {
build: process.env.TRAVIS_JOB_ID,
concurrency: 10,
urls: ['http://127.0.0.1:3000/js/tests/index.html'],
browsers: grunt.file.readYAML('test-infra/sauce_browsers.yml')
browsers: grunt.file.readYAML('grunt/sauce_browsers.yml')
}
}
},
Expand All @@ -390,7 +406,7 @@ module.exports = function (grunt) {

// These plugins provide necessary tasks.
require('load-grunt-tasks')(grunt, {scope: 'devDependencies'});
grunt.loadTasks('./grunt/tasks/');
require('time-grunt')(grunt);

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

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

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

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

// task for building customizer
grunt.registerTask('build-customizer', ['build-customizer-html', 'build-raw-files']);
grunt.registerTask('build-customizer-html', 'jade');
grunt.registerTask('build-raw-files', 'Add scripts/less files to customizer.', function () {
var banner = grunt.template.process('<%= banner %>');
generateRawFilesJs(banner);
generateRawFiles(grunt, banner);
});

// Task for updating the npm packages used by the Travis build.
Expand Down
Loading

0 comments on commit 0e329a8

Please sign in to comment.