]> source.dussan.org Git - jquery.git/commitdiff
Modularize ajax (and sub-modules).
authorjaubourg <j@ubourg.net>
Mon, 11 Jun 2012 16:51:28 +0000 (18:51 +0200)
committerjaubourg <j@ubourg.net>
Mon, 11 Jun 2012 16:51:28 +0000 (18:51 +0200)
Tests are guaranteed to run with ajax removed, not with just ajax/jsonp, ajax/script or ajax/xhr removed.
Removing ajax saves 3982 bytes minified gzipped.

grunt.js

index 062ce837d229ddb8e9bd440d8dd6a1861a94a250..48a02ee87cdb4dea3239f8d1cfd86cc471a30b30 100644 (file)
--- a/grunt.js
+++ b/grunt.js
@@ -64,10 +64,10 @@ module.exports = function( grunt ) {
                                "src/traversing.js",
                                "src/manipulation.js",
                                { flag: "css", src: "src/css.js" },
-                               "src/ajax.js",
-                               "src/ajax/jsonp.js",
-                               "src/ajax/script.js",
-                               "src/ajax/xhr.js",
+                               { flag: "ajax", src: "src/ajax.js" },
+                               { flag: "ajax/jsonp", src: "src/ajax/jsonp.js", needs: [ "ajax", "ajax/script" ]  },
+                               { flag: "ajax/script", src: "src/ajax/script.js", needs: ["ajax"]  },
+                               { flag: "ajax/xhr", src: "src/ajax/xhr.js", needs: ["ajax"]  },
                                { flag: "effects", src: "src/effects.js", needs: ["css"] },
                                { flag: "offset", src: "src/offset.js", needs: ["css"] },
                                { flag: "dimensions", src: "src/dimensions.js", needs: ["css"] },