From a47b304f814458fb1f53e1fda82e7ccb7c07189d Mon Sep 17 00:00:00 2001 From: jaubourg Date: Mon, 11 Jun 2012 18:51:28 +0200 Subject: [PATCH] Modularize ajax (and sub-modules). 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/grunt.js b/grunt.js index 062ce837d..48a02ee87 100644 --- 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"] },