Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert UMD for now, due to #13812. #13904

Merged
merged 1 commit into from
Jun 24, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module.exports = function (grunt) {
' * Licensed under <%= pkg.license.type %> (<%= pkg.license.url %>)\n' +
' */\n',
// NOTE: This jqueryCheck code is duplicated in customizer.js; if making changes here, be sure to update the other copy too.
jqueryCheck: 'if (typeof define == \'undefined\' && typeof exports == \'undefined\' && typeof jQuery == \'undefined\') { throw new Error(\'Bootstrap\\\'s JavaScript requires jQuery\') }\n\n',
jqueryCheck: 'if (typeof jQuery === \'undefined\') { throw new Error(\'Bootstrap\\\'s JavaScript requires jQuery\') }\n\n',

// Task configuration.
clean: {
Expand Down
2 changes: 1 addition & 1 deletion dist/js/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/

if (typeof define == 'undefined' && typeof exports == 'undefined' && typeof jQuery == 'undefined') { throw new Error('Bootstrap\'s JavaScript requires jQuery') }
if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript requires jQuery') }

/* ========================================================================
* Bootstrap: transition.js v3.1.1
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/js/_src/customizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ window.onload = function () { // wait for load in a dumb way because B-0

function generateJS(preamble) {
var $checked = $('#plugin-section input:checked')
var jqueryCheck = 'if (typeof define == \'undefined\' && typeof exports == \'undefined\' && typeof jQuery == \'undefined\') { throw new Error(\'Bootstrap\\\'s JavaScript requires jQuery\') }\n\n'
var jqueryCheck = 'if (typeof jQuery === "undefined") { throw new Error("Bootstrap\'s JavaScript requires jQuery") }\n\n'

if (!$checked.length) return false

Expand Down
3 changes: 2 additions & 1 deletion js/.jscsrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
"disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
"disallowSpacesInsideArrayBrackets": true,
"disallowTrailingComma": true,
"disallowSpacesInsideParentheses": true,
"disallowTrailingComma": true,
"disallowTrailingWhitespace": true,
"requireCamelCaseOrUpperCaseIdentifiers": true,
"requireCapitalizedConstructors": true,
"requireCommaBeforeLineBreak": true,
"requireDotNotation": true,
Expand Down
3 changes: 1 addition & 2 deletions js/.jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@
"nonbsp" : true,
"strict" : true,
"undef" : true,
"unused" : true,
"predef" : [ "define", "require" ]
"unused" : true
}
12 changes: 3 additions & 9 deletions js/affix.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@
* ======================================================================== */


+function () { 'use strict';

(function (o_o) {
typeof define == 'function' && define.amd ? define(['jquery'], o_o) :
typeof exports == 'object' ? o_o(require('jquery')) : o_o(jQuery)
})(function ($) {
+function ($) {
'use strict';

// AFFIX CLASS DEFINITION
// ======================
Expand Down Expand Up @@ -143,6 +139,4 @@
})
})

})

}();
}(jQuery);
12 changes: 3 additions & 9 deletions js/alert.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@
* ======================================================================== */


+function () { 'use strict';

(function (o_o) {
typeof define == 'function' && define.amd ? define(['jquery'], o_o) :
typeof exports == 'object' ? o_o(require('jquery')) : o_o(jQuery)
})(function ($) {
+function ($) {
'use strict';

// ALERT CLASS DEFINITION
// ======================
Expand Down Expand Up @@ -93,6 +89,4 @@

$(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)

})

}();
}(jQuery);
12 changes: 3 additions & 9 deletions js/button.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@
* ======================================================================== */


+function () { 'use strict';

(function (o_o) {
typeof define == 'function' && define.amd ? define(['jquery'], o_o) :
typeof exports == 'object' ? o_o(require('jquery')) : o_o(jQuery)
})(function ($) {
+function ($) {
'use strict';

// BUTTON PUBLIC CLASS DEFINITION
// ==============================
Expand Down Expand Up @@ -111,6 +107,4 @@
e.preventDefault()
})

})

}();
}(jQuery);
12 changes: 3 additions & 9 deletions js/carousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@
* ======================================================================== */


+function () { 'use strict';

(function (o_o) {
typeof define == 'function' && define.amd ? define(['jquery'], o_o) :
typeof exports == 'object' ? o_o(require('jquery')) : o_o(jQuery)
})(function ($) {
+function ($) {
'use strict';

// CAROUSEL CLASS DEFINITION
// =========================
Expand Down Expand Up @@ -223,6 +219,4 @@
})
})

})

}();
}(jQuery);
12 changes: 3 additions & 9 deletions js/collapse.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@
* ======================================================================== */


+function () { 'use strict';

(function (o_o) {
typeof define == 'function' && define.amd ? define(['jquery'], o_o) :
typeof exports == 'object' ? o_o(require('jquery')) : o_o(jQuery)
})(function ($) {
+function ($) {
'use strict';

// COLLAPSE PUBLIC CLASS DEFINITION
// ================================
Expand Down Expand Up @@ -171,6 +167,4 @@
Plugin.call($target, option)
})

})

}();
}(jQuery);
12 changes: 3 additions & 9 deletions js/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@
* ======================================================================== */


+function () { 'use strict';

(function (o_o) {
typeof define == 'function' && define.amd ? define(['jquery'], o_o) :
typeof exports == 'object' ? o_o(require('jquery')) : o_o(jQuery)
})(function ($) {
+function ($) {
'use strict';

// DROPDOWN CLASS DEFINITION
// =========================
Expand Down Expand Up @@ -152,6 +148,4 @@
.on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
.on('keydown.bs.dropdown.data-api', toggle + ', [role="menu"], [role="listbox"]', Dropdown.prototype.keydown)

})

}();
}(jQuery);
12 changes: 3 additions & 9 deletions js/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@
* ======================================================================== */


+function () { 'use strict';

(function (o_o) {
typeof define == 'function' && define.amd ? define(['jquery'], o_o) :
typeof exports == 'object' ? o_o(require('jquery')) : o_o(jQuery)
})(function ($) {
+function ($) {
'use strict';

// MODAL CLASS DEFINITION
// ======================
Expand Down Expand Up @@ -281,6 +277,4 @@
Plugin.call($target, option, this)
})

})

}();
}(jQuery);
12 changes: 3 additions & 9 deletions js/popover.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@
* ======================================================================== */


+function () { 'use strict';

(function (o_o) {
typeof define == 'function' && define.amd ? define(['jquery'], o_o) :
typeof exports == 'object' ? o_o(require('jquery')) : o_o(jQuery)
})(function ($) {
+function ($) {
'use strict';

// POPOVER PUBLIC CLASS DEFINITION
// ===============================
Expand Down Expand Up @@ -114,6 +110,4 @@
return this
}

})

}();
}(jQuery);
12 changes: 3 additions & 9 deletions js/scrollspy.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@
* ======================================================================== */


+function () { 'use strict';

(function (o_o) {
typeof define == 'function' && define.amd ? define(['jquery'], o_o) :
typeof exports == 'object' ? o_o(require('jquery')) : o_o(jQuery)
})(function ($) {
+function ($) {
'use strict';

// SCROLLSPY CLASS DEFINITION
// ==========================
Expand Down Expand Up @@ -171,6 +167,4 @@
})
})

})

}();
}(jQuery);
12 changes: 3 additions & 9 deletions js/tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@
* ======================================================================== */


+function () { 'use strict';

(function (o_o) {
typeof define == 'function' && define.amd ? define(['jquery'], o_o) :
typeof exports == 'object' ? o_o(require('jquery')) : o_o(jQuery)
})(function ($) {
+function ($) {
'use strict';

// TAB CLASS DEFINITION
// ====================
Expand Down Expand Up @@ -129,6 +125,4 @@
Plugin.call($(this), 'show')
})

})

}();
}(jQuery);
12 changes: 3 additions & 9 deletions js/tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,8 @@
* ======================================================================== */


+function () { 'use strict';

(function (o_o) {
typeof define == 'function' && define.amd ? define(['jquery'], o_o) :
typeof exports == 'object' ? o_o(require('jquery')) : o_o(jQuery)
})(function ($) {
+function ($) {
'use strict';

// TOOLTIP PUBLIC CLASS DEFINITION
// ===============================
Expand Down Expand Up @@ -458,6 +454,4 @@
return this
}

})

}();
}(jQuery);
12 changes: 3 additions & 9 deletions js/transition.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@
* ======================================================================== */


+function () { 'use strict';

(function (o_o) {
typeof define == 'function' && define.amd ? define(['jquery'], o_o) :
typeof exports == 'object' ? o_o(require('jquery')) : o_o(jQuery)
})(function ($) {
+function ($) {
'use strict';

// CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
// ============================================================
Expand Down Expand Up @@ -60,6 +56,4 @@
}
})

})

}();
}(jQuery);