mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-29 21:52:22 +01:00
Integrate mq4-hover-hover-shim
This commit is contained in:
parent
8e374bd010
commit
eaaaa00520
15
Gruntfile.js
15
Gruntfile.js
@ -19,6 +19,7 @@ module.exports = function (grunt) {
|
||||
var path = require('path');
|
||||
var glob = require('glob');
|
||||
var npmShrinkwrap = require('npm-shrinkwrap');
|
||||
var mq4HoverShim = require('mq4-hover-hover-shim');
|
||||
|
||||
var generateCommonJSModule = require('./grunt/bs-commonjs-generator.js');
|
||||
var configBridge = grunt.file.readJSON('./grunt/configBridge.json', { encoding: 'utf8' });
|
||||
@ -107,6 +108,8 @@ module.exports = function (grunt) {
|
||||
},
|
||||
bootstrap: {
|
||||
src: [
|
||||
'js/hover.js',
|
||||
mq4HoverShim.featureDetector.umdGlobal,
|
||||
'js/transition.js',
|
||||
'js/alert.js',
|
||||
'js/button.js',
|
||||
@ -153,6 +156,16 @@ module.exports = function (grunt) {
|
||||
}
|
||||
},
|
||||
|
||||
postcss: {
|
||||
options: {
|
||||
map: true,
|
||||
processors: [mq4HoverShim.postprocessorFor({hoverSelectorPrefix: '.bs-true-hover '})]
|
||||
},
|
||||
core: {
|
||||
src: 'dist/css/<%= pkg.name %>.css'
|
||||
}
|
||||
},
|
||||
|
||||
autoprefixer: {
|
||||
options: {
|
||||
browsers: [
|
||||
@ -392,7 +405,7 @@ module.exports = function (grunt) {
|
||||
})(process.env.TWBS_SASS || 'libsass');
|
||||
grunt.registerTask('sass-compile', ['sass:core', 'sass:docs']);
|
||||
|
||||
grunt.registerTask('dist-css', ['sass-compile', 'autoprefixer:core', 'usebanner', 'csscomb:dist', 'cssmin:core', 'cssmin:docs']);
|
||||
grunt.registerTask('dist-css', ['sass-compile', 'postcss:core', 'autoprefixer:core', 'usebanner', 'csscomb:dist', 'cssmin:core', 'cssmin:docs']);
|
||||
|
||||
// Full distribution task.
|
||||
grunt.registerTask('dist', ['clean:dist', 'dist-css', 'dist-js']);
|
||||
|
4
js/hover.js
Normal file
4
js/hover.js
Normal file
@ -0,0 +1,4 @@
|
||||
$(document).on('mq4hsChange', function (e) {
|
||||
'use strict';
|
||||
$(document.documentElement).toggleClass('bs-true-hover', e.trueHover);
|
||||
});
|
@ -54,12 +54,14 @@
|
||||
"grunt-html-validation": "~0.1.18",
|
||||
"grunt-jekyll": "~0.4.2",
|
||||
"grunt-jscs": "~1.2.0",
|
||||
"grunt-postcss": "^0.3.0",
|
||||
"grunt-sass": "~0.17.0",
|
||||
"grunt-saucelabs": "~8.5.0",
|
||||
"grunt-scss-lint": "^0.3.4",
|
||||
"grunt-sed": "~0.1.1",
|
||||
"load-grunt-tasks": "~2.0.0",
|
||||
"markdown-it": "^3.0.4",
|
||||
"mq4-hover-hover-shim": "0.0.4",
|
||||
"npm-shrinkwrap": "^200.0.0",
|
||||
"time-grunt": "~1.0.0"
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user