]> source.dussan.org Git - jquery.git/commitdiff
Fixes #14450. Remove CommonJS+AMD syntax.
authorTimmy Willison <timmywillisn@gmail.com>
Tue, 15 Oct 2013 14:40:48 +0000 (10:40 -0400)
committerTimmy Willison <timmywillisn@gmail.com>
Tue, 15 Oct 2013 14:40:48 +0000 (10:40 -0400)
src/core.js
src/css.js
src/effects.js
src/event.js
src/manipulation.js
src/offset.js

index 0377d94ec7f5849f761c45564c3e5a17f0119ab5..994fd4c6068018296e31f925cf78f564a85ddc21 100644 (file)
@@ -1,17 +1,17 @@
-define(function( require ) {
+define([
+       "./var/arr",
+       "./var/slice",
+       "./var/concat",
+       "./var/push",
+       "./var/indexOf",
+       "./var/class2type",
+       "./var/toString",
+       "./var/hasOwn",
+       "./var/trim",
+       "./var/support"
+], function( arr, slice, concat, push, indexOf, class2type, toString, hasOwn, trim, support ) {
 
 var
-       arr = require( "./var/arr" ),
-       slice = require( "./var/slice" ),
-       concat = require( "./var/concat" ),
-       push = require( "./var/push" ),
-       indexOf = require( "./var/indexOf" ),
-       class2type = require( "./var/class2type" ),
-       toString = require( "./var/toString" ),
-       hasOwn = require( "./var/hasOwn" ),
-       trim = require( "./var/trim" ),
-       support = require( "./var/support" ),
-
        // Use the correct document accordingly with window argument (sandbox)
        document = window.document,
 
index 3e319bfc285d9723fb95bc6033eb18cd099c2c88..79127ec0e5f589a05506607e3434a54a738ae5ee 100644 (file)
@@ -1,22 +1,26 @@
-// Require more than a few needed variables
-// Keep in mind that a dependency array cannot be used with CommonJS+AMD syntax
-define(function( require ) {
+define([
+       "./core",
+       "./var/pnum",
+       "./core/access",
+       "./css/var/rmargin",
+       "./css/var/rnumnonpx",
+       "./css/var/cssExpand",
+       "./css/var/isHidden",
+       "./css/var/getStyles",
+       "./css/curCSS",
+       "./css/defaultDisplay",
+       "./css/addGetHookIf",
+       "./css/support",
+       "./data/var/data_priv",
+
+       "./core/init",
+       "./css/swap",
+       "./core/ready",
+       "./selector" // contains
+], function( jQuery, pnum, access, rmargin, rnumnonpx, cssExpand, isHidden,
+       getStyles, curCSS, defaultDisplay, addGetHookIf, support, data_priv ) {
 
 var
-       jQuery = require( "./core" ),
-       pnum = require( "./var/pnum" ),
-       access = require( "./core/access" ),
-       rmargin = require( "./css/var/rmargin" ),
-       rnumnonpx = require( "./css/var/rnumnonpx" ),
-       cssExpand = require( "./css/var/cssExpand" ),
-       isHidden = require( "./css/var/isHidden" ),
-       getStyles = require( "./css/var/getStyles" ),
-       curCSS = require( "./css/curCSS" ),
-       support = require( "./css/support" ),
-       defaultDisplay = require( "./css/defaultDisplay" ),
-       addGetHookIf = require( "./css/addGetHookIf" ),
-       data_priv = require( "./data/var/data_priv" ),
-
        // swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
        // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
        rdisplayswap = /^(none|table(?!-c[ea]).+)/,
@@ -31,12 +35,6 @@ var
 
        cssPrefixes = [ "Webkit", "O", "Moz", "ms" ];
 
-// Dependencies not needed as vars
-require( "./core/init" );
-require( "./css/swap" );
-require( "./core/ready" );
-require( "./selector" ); // contains
-
 // return a css property mapped to a potentially vendor prefixed property
 function vendorPropName( style, name ) {
 
index 611336053bb9bee6b58f0664c719144674c74d5e..cbf098d1a5f19b7956ec933dd67f857d7261b603 100644 (file)
@@ -1,13 +1,20 @@
-define(function( require ) {
+define([
+       "./core",
+       "./var/pnum",
+       "./css/var/cssExpand",
+       "./css/var/isHidden",
+       "./css/defaultDisplay",
+       "./data/var/data_priv",
+
+       "./core/init",
+       "./effects/Tween",
+       "./queue",
+       "./css",
+       "./deferred",
+       "./traversing"
+], function( jQuery, pnum, cssExpand, isHidden, defaultDisplay, data_priv ) {
 
 var
-       jQuery = require( "./core" ),
-       pnum = require( "./var/pnum" ),
-       cssExpand = require( "./css/var/cssExpand" ),
-       isHidden = require( "./css/var/isHidden" ),
-       defaultDisplay = require( "./css/defaultDisplay" ),
-       data_priv = require( "./data/var/data_priv" ),
-
        fxNow, timerId,
        rfxtypes = /^(?:toggle|show|hide)$/,
        rfxnum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ),
@@ -64,14 +71,6 @@ var
                } ]
        };
 
-// Dependencies not needed as vars
-require( "./core/init" );
-require( "./effects/Tween" );
-require( "./queue" );
-require( "./css" );
-require( "./deferred" );
-require( "./traversing" );
-
 // Animations created synchronously will run synchronously
 function createFxNow() {
        setTimeout(function() {
index 9efa5097319e863abc7aba1f94072d781a0636e1..2fd702c63156d0d7f2971016d4f45c7082c0be1b 100644 (file)
@@ -1,23 +1,23 @@
-define(function( require ) {
+define([
+       "./core",
+       "./var/strundefined",
+       "./var/rnotwhite",
+       "./var/hasOwn",
+       "./var/slice",
+       "./event/support",
+       "./data/var/data_priv",
+
+       "./core/init",
+       "./data/accepts",
+       "./selector"
+], function( jQuery, strundefined, rnotwhite, hasOwn, slice, support, data_priv ) {
 
 var
-       jQuery = require( "./core" ),
-       strundefined = require( "./var/strundefined" ),
-       rnotwhite = require( "./var/rnotwhite" ),
-       hasOwn = require( "./var/hasOwn" ),
-       slice = require( "./var/slice" ),
-       support = require( "./event/support" ),
-       data_priv = require( "./data/var/data_priv" ),
        rkeyEvent = /^key/,
        rmouseEvent = /^(?:mouse|contextmenu)|click/,
        rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
        rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
 
-// Dependencies not needed as vars
-require( "./core/init" );
-require( "./data/accepts" );
-require( "./selector" );
-
 function returnTrue() {
        return true;
 }
index e27616fe3311c77ec03cb9534eb7d1f5637468b8..3de597f0f1ddaad6971e0f5bae55d0bb754538b4 100644 (file)
@@ -1,16 +1,21 @@
-// Require more than a few needed variables
-// Keep in mind that a dependency array cannot be used with CommonJS+AMD syntax
-define(function( require ) {
+define([
+       "./core",
+       "./var/concat",
+       "./var/push",
+       "./core/access",
+       "./manipulation/var/rcheckableType",
+       "./manipulation/support",
+       "./data/var/data_priv",
+       "./data/var/data_user",
+
+       "./core/init",
+       "./data/accepts",
+       "./traversing",
+       "./selector",
+       "./event"
+], function( jQuery, concat, push, access, rcheckableType, support, data_priv, data_user ) {
 
 var
-       jQuery = require( "./core" ),
-       concat = require( "./var/concat" ),
-       push = require( "./var/push" ),
-       access = require( "./core/access" ),
-       rcheckableType = require( "./manipulation/var/rcheckableType" ),
-       support = require( "./manipulation/support" ),
-       data_priv = require( "./data/var/data_priv" ),
-       data_user = require( "./data/var/data_user" ),
        rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
        rtagName = /<([\w:]+)/,
        rhtml = /<|&#?\w+;/,
@@ -41,13 +46,6 @@ wrapMap.optgroup = wrapMap.option;
 wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
 wrapMap.th = wrapMap.td;
 
-// Dependencies not needed as variables
-require( "./core/init" );
-require( "./data/accepts" );
-require( "./traversing" );
-require( "./selector" );
-require( "./event" );
-
 // Support: 1.x compatibility
 // Manipulating tables requires a tbody
 function manipulationTarget( elem, content ) {
index 0aeaad26ee3ec82f97b2dedc26a4b061e0417889..224f74de445d681d485adac64b629a48d918c37b 100644 (file)
@@ -1,18 +1,18 @@
-define(function( require ) {
-
-var
-       jQuery = require( "./core" ),
-       strundefined = require( "./var/strundefined" ),
-       access = require( "./core/access" ),
-       rnumnonpx = require( "./css/var/rnumnonpx" ),
-       curCSS = require( "./css/curCSS" ),
-       addGetHookIf = require( "./css/addGetHookIf" ),
-       support = require( "./css/support" ),
-       docElem = window.document.documentElement;
-
-require( "./core/init" );
-require( "./css" );
-require( "./selector" ); // contains
+define([
+       "./core",
+       "./var/strundefined",
+       "./core/access",
+       "./css/var/rnumnonpx",
+       "./css/curCSS",
+       "./css/addGetHookIf",
+       "./css/support",
+
+       "./core/init",
+       "./css",
+       "./selector" // contains
+], function( jQuery, strundefined, access, rnumnonpx, curCSS, addGetHookIf, support ) {
+
+var docElem = window.document.documentElement;
 
 /**
  * Gets a window from an element