Skip to content
Permalink
Browse files

Specify support as a dependency wherever it is used. Optimize module …

…order to save 15 bytes.
  • Loading branch information...
timmywil committed Aug 16, 2013
1 parent 7877c4f commit cecb52ff5c5c5c6a030b6520dc1e39ec4c6df3d9
Showing with 21 additions and 12 deletions.
  1. +1 −1 README.md
  2. +2 −1 src/ajax/xhr.js
  3. +2 −1 src/attributes/attr.js
  4. +2 −1 src/attributes/prop.js
  5. +2 −1 src/attributes/val.js
  6. +3 −1 src/css.js
  7. +2 −2 src/jquery.js
  8. +2 −1 src/manipulation.js
  9. +2 −2 src/offset.js
  10. +3 −1 src/support.js
@@ -86,7 +86,7 @@ Some example modules that can be excluded are:
- **offset**: The `.offset()`, `.position()`, `.offsetParent()`, `.scrollLeft()`, and `.scrollTop()` methods.
- **wrap**: The `.wrap()`, `.wrapAll()`, `.wrapInner()`, and `.unwrap()` methods.
- **exports/amd**: Exclude the AMD definition.
- **core/ready**: Exclude the ready module if you place your scripts at the end of the body. Any ready callbacks will simply be called immediately.
- **core/ready**: Exclude the ready module if you place your scripts at the end of the body. Any ready callbacks bound with `jQuery()` will simply be called immediately. However, `jQuery(document).ready()` will not be a function and `.on("ready", ...)` or similar will not be triggered.
- **deferred**: Exclude jQuery.Deferred. This also removes jQuery.Callbacks. *Note* that modules that depend on jQuery.Deferred(AJAX, effects, core/ready) will not be removed and will still expect jQuery.Deferred to be there. Include your own jQuery.Deferred implementation or exclude those modules as well (`grunt custom:-deferred,-ajax,-effects,-core/ready`).
- **support**: Excluding the support module is not recommended, but possible. It's your responsibility to either remove modules that use jQuery.support (many of them) or replace the values wherever jQuery.support is used. This is mainly only useful when building a barebones version of jQuery.

@@ -1,6 +1,7 @@
define([
"../core",
"../ajax"
"../ajax",
"../support"
], function( jQuery ) {

jQuery.ajaxSettings.xhr = function() {
@@ -2,7 +2,8 @@ define([
"../core",
"../var/rnotwhite",
"../var/strundefined",
"../selector"
"../selector",
"../support"
], function( jQuery, rnotwhite, strundefined ) {

var nodeHook, boolHook;
@@ -1,5 +1,6 @@
define([
"../core"
"../core",
"../support"
], function( jQuery ) {

var rfocusable = /^(?:input|select|textarea|button)$/i;
@@ -1,5 +1,6 @@
define([
"../core"
"../core",
"../support"
], function( jQuery ) {

var rreturn = /\r/g;
@@ -6,7 +6,9 @@ define([
"./css/defaultDisplay",
"./data/var/data_priv",
"./core/swap",
"./selector" // contains
"./core/ready",
"./selector", // contains
"./support"
], function( jQuery, pnum, cssExpand, isHidden, defaultDisplay, data_priv ) {
var curCSS,
// swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
@@ -1,10 +1,11 @@
define([
"./core",
"./selector",
"./traversing",
"./callbacks",
"./deferred",
"./core/ready",
"./traversing",
"./support",
"./data",
"./queue",
"./queue/delay",
@@ -26,7 +27,6 @@ define([
"./effects/animated-selector",
"./offset",
"./dimensions",
"./support",
"./deprecated"
], function( jQuery ) {

@@ -8,7 +8,8 @@ define([
"./data/accepts",
"./selector",
"./traversing",
"./event"
"./event",
"./support"
], function( jQuery, concat, push, rcheckableType, data_priv, data_user ){

var rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
@@ -2,7 +2,7 @@ define([
"./core",
"./var/strundefined",
"./css",
"./selector"
"./selector" // contains
], function( jQuery, strundefined ) {

var docElem = window.document.documentElement;
@@ -136,7 +136,7 @@ jQuery.fn.extend({
return this.map(function() {
var offsetParent = this.offsetParent || docElem;

while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position") === "static" ) ) {
while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position" ) === "static" ) ) {
offsetParent = offsetParent.offsetParent;
}

@@ -1,6 +1,8 @@
define([
"./core",
"./core/swap"
"./core/swap",
// This is listed as a dependency for build order, but it's still optional in builds
"./core/ready"
], function( jQuery ) {

jQuery.support = (function( support ) {

0 comments on commit cecb52f

Please sign in to comment.
You can’t perform that action at this time.