]> source.dussan.org Git - jquery.git/commitdiff
Moved from the old JSMin to using YUIMin for compressing the jQuery source. Additiona...
authorJohn Resig <jeresig@gmail.com>
Sun, 4 Jan 2009 15:29:27 +0000 (15:29 +0000)
committerJohn Resig <jeresig@gmail.com>
Sun, 4 Jan 2009 15:29:27 +0000 (15:29 +0000)
Makefile
build/yuicompressor-2.4.2.jar [new file with mode: 0644]
src/ajax.js
src/core.js
src/offset.js

index 36bd11cff5390dc8ce279e5ad22da663c70d28ec..2d344c6a58375a790bdce1bc9a12b3fb3c0f3882 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -50,6 +50,7 @@ JQ_VER = `cat version.txt`
 VER = sed s/@VERSION/${JQ_VER}/
 
 JAR = java -jar ${BUILD_DIR}/js.jar
+MINJAR = java -jar ${BUILD_DIR}/yuicompressor-2.4.2.jar
 
 all: jquery lite min pack speed
        @@echo "jQuery build complete."
@@ -104,7 +105,7 @@ ${JQ_MIN}: ${JQ}
        @@echo "Building" ${JQ_MIN}
 
        @@echo " - Compressing using Minifier"
-       @@${JAR} ${BUILD_DIR}/build/min.js ${JQ} ${JQ_MIN}
+       @@${MINJAR} ${JQ} > ${JQ_MIN}
 
        @@echo ${JQ_MIN} "Built"
        @@echo
diff --git a/build/yuicompressor-2.4.2.jar b/build/yuicompressor-2.4.2.jar
new file mode 100644 (file)
index 0000000..c29470b
Binary files /dev/null and b/build/yuicompressor-2.4.2.jar differ
index 6c8a22e8a841339f83a012e808a4f46236fbe83f..c255dfebaaeafb6247a13e29eb2d1d4453b57722 100644 (file)
@@ -497,7 +497,7 @@ jQuery.extend({
 
                        // Get the JavaScript object, if JSON is used.
                        if ( type == "json" )
-                               data = eval("(" + data + ")");
+                               data = window["eval"]("(" + data + ")");
                }
                
                return data;
index 592c9a0332985e45bda49e42d2a1d1ab5533a755..8c4c09b460682ad02c52d21d9c0def35b7956358 100644 (file)
@@ -9,6 +9,9 @@
  * $Rev$
  */
 
+// Will speed up references to window, and allows munging its name.
+var window = this;
+
 // Map over jQuery in case of overwrite
 var _jQuery = window.jQuery,
 // Map over the $ in case of overwrite
index c7f26d1c803943c64c7ca68b2831360be35d745a..cc1b8744030ceb74b53bfd776336ea3bf510a5db 100644 (file)
@@ -50,7 +50,7 @@ else
 jQuery.offset = {
        initialize: function() {
                if ( this.initialized ) return;
-               var body = document.body, container = document.createElement('div'), innerDiv, checkDiv, table, rules, prop, bodyMarginTop = body.style.marginTop,
+               var body = document.body, container = document.createElement('div'), innerDiv, checkDiv, table, td, rules, prop, bodyMarginTop = body.style.marginTop,
                        html = '<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"cellpadding="0"cellspacing="0"><tr><td></td></tr></table>';
 
                rules = { position: 'absolute', top: 0, left: 0, margin: 0, border: 0, width: '1px', height: '1px', visibility: 'hidden' };