요즘은 왠만한 오픈소스는 github.com 에 있다. jQuery도 여기에 메인 레파지토리로 github를 쓴다. jQuery를 좀 까볼 속셈으로 https://github.com/jquery/jquery 들어가서 Fork를 하나 받았다. 적당한 폴더에 가서 fork 받은 repos에서 clone을 받는다.

$ git clone git@github.com:zziuni/jquery.git

테그를 찍어본다.

$ git tag

...
1.6.4
1.6.4rc1
1.6b1
1.6rc1
1.7
1.7.1
1.7.1rc1
1.7b1
1.7b2
1.7rc1

멋지게 release version 관리가 되고 있다. 굳. 꼴랑 0.0.1 올라갔을 때는 뭐가 바뀌는건가. 궁금해서 diff를 찍어본다.

$ git diff 1.7 1.7.1

diff --git a/Makefile b/Makefile
index 77219e3..b33fc2a 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ BUILD_DIR = build
 PREFIX = .
 DIST_DIR = ${PREFIX}/dist

-JS_ENGINE ?= `which node nodejs`
+JS_ENGINE ?= `which node nodejs 2>/dev/null`
 COMPILER = ${JS_ENGINE} ${BUILD_DIR}/uglify.js --unsafe
 POST_COMPILER = ${JS_ENGINE} ${BUILD_DIR}/post-compile.js

@@ -27,7 +27,8 @@ BASE_FILES = ${SRC_DIR}/core.js\
        ${SRC_DIR}/ajax/xhr.js\
        ${SRC_DIR}/effects.js\
        ${SRC_DIR}/offset.js\
-       ${SRC_DIR}/dimensions.js
+       ${SRC_DIR}/dimensions.js\
+       ${SRC_DIR}/exports.js
...
...

쿠~억. 너무 많다. 1.7.1에서 ajax 처리가 바뀐게 있나만 살펴 본다.

$ cd src
$ git diff 1.7 1.7.1 -- ajax.js

diff --git a/src/ajax.js b/src/ajax.js
index cfd43d9..bb64b68 100644
--- a/src/ajax.js
+++ b/src/ajax.js
@@ -261,7 +261,7 @@ jQuery.fn.extend({
 // Attach a bunch of functions for handling common AJAX events
 jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ),
        jQuery.fn[ o ] = function( f ){
-               return this.bind( o, f );
+               return this.on( o, f );
        };
 });

@@ -755,7 +755,7 @@ jQuery.extend({
                                        done( -1, e );
                                // Simply rethrow otherwise
                                } else {
-                                       jQuery.error( e );
+                                       throw e;
                                }
                        }
                }

아~하. bind() 대신에 1.7에서 추가된 on()으로 내부 사용을 변경 했구나. 그거 말고는... 에러 처리 방법이 바뀌었내. 1.7.1은 필요없고.. 1.7로 아예 돌려버릴까. 싶다면,

$ git reset --hard 1.7

그러면 소스가 1.7돌려진다. 내친김에 jQuery 1.0보고 싶다면,

$ git reset --hard 1.0

지금 처럼 모듈별로 나뉘지 않은 소스를 볼 수 있다.

구경 다 했으면 다시 원복.

$ git reflog
$ git reset --hard HEARD@{2}

요즘 이러고 논다.

2011/12/20 12:41 2011/12/20 12:41
Trackback address :: http://zziuni.pe.kr/zziuni/trackback/579

Comments List

Write a comment.

[로그인][오픈아이디란?]