Friday, May 24, 2013

Build JQuery with AJAX Only

resulting minified is 31443 bytes (without jsonp)
 
Step 1) Clone the GitHub repo

git clone git://github.com/jquery/jquery.git


Step 2) Concatenate the following files:
/d/dev/javascript/jquery/jquery/src/intro.js
/d/dev/javascript/jquery/jquery/src/core.js
/d/dev/javascript/jquery/jquery/src/callbacks.js
/d/dev/javascript/jquery/jquery/src/deferred.js
/d/dev/javascript/jquery/jquery/src/support.js
/d/dev/javascript/jquery/jquery/src/data.js
/d/dev/javascript/jquery/jquery/src/event.js
/d/dev/javascript/jquery/jquery/src/serialize.js
/d/dev/javascript/jquery/jquery/src/ajax.js
/d/dev/javascript/jquery/jquery/src/ajax/xhr.js
/d/dev/javascript/jquery/jquery/src/exports.js
/d/dev/javascript/jquery/jquery/src/outro.js


you can use linux's cat command to concatenate the above.

Step 3) Download Google's  closure tools
http://code.google.com/p/closure-compiler/downloads/list
 
Step 4) Execute the following command:
java -jar compiler.jar --js [the-concatenated-file-above]  > output.jquery.ajaxonly.min.js




note: open jquery's Gruntfile.js if you want to add jsonp