mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-30 22:52:24 +01:00
Make jQuery 2.0 the minimum supported version.
This commit is contained in:
parent
a50849f61b
commit
9eded912a0
@ -46,8 +46,8 @@ module.exports = function (grunt) {
|
|||||||
'}\n',
|
'}\n',
|
||||||
jqueryVersionCheck: '+function ($) {\n' +
|
jqueryVersionCheck: '+function ($) {\n' +
|
||||||
' var version = $.fn.jquery.split(\' \')[0].split(\'.\')\n' +
|
' var version = $.fn.jquery.split(\' \')[0].split(\'.\')\n' +
|
||||||
' if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1)) {\n' +
|
' if (version[0] !== \'2\') {\n' +
|
||||||
' throw new Error(\'Bootstrap\\\'s JavaScript requires jQuery version 1.9.1 or higher\')\n' +
|
' throw new Error(\'Bootstrap\\\'s JavaScript requires jQuery version 2.x.x\')\n' +
|
||||||
' }\n' +
|
' }\n' +
|
||||||
'}(jQuery);\n\n',
|
'}(jQuery);\n\n',
|
||||||
|
|
||||||
|
@ -29,6 +29,6 @@
|
|||||||
"test-infra"
|
"test-infra"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"jquery": "1.9.1 - 2"
|
"jquery": "2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,21 +7,5 @@
|
|||||||
"../assets/js/vendor/tether.min.js",
|
"../assets/js/vendor/tether.min.js",
|
||||||
"../assets/js/src/application.js"
|
"../assets/js/src/application.js"
|
||||||
]
|
]
|
||||||
},
|
|
||||||
"config": {
|
|
||||||
"jqueryCheck": [
|
|
||||||
"if (typeof jQuery === 'undefined') {",
|
|
||||||
" throw new Error('Bootstrap\\'s JavaScript requires jQuery')",
|
|
||||||
"}\n"
|
|
||||||
],
|
|
||||||
"jqueryVersionCheck": [
|
|
||||||
"+function ($) {",
|
|
||||||
" 'use strict';",
|
|
||||||
" var version = $.fn.jquery.split(' ')[0].split('.')",
|
|
||||||
" if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 2)) {",
|
|
||||||
" throw new Error('Bootstrap\\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3')",
|
|
||||||
" }",
|
|
||||||
"}(jQuery);\n\n"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user