flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [8/8] git commit: [flex-falcon] [refs/heads/develop] - patch $ command in jquery
Date Tue, 24 May 2016 16:07:10 GMT
patch $ command in jquery


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/f1928725
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/f1928725
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/f1928725

Branch: refs/heads/develop
Commit: f192872530bdc91ce9aac82c5d01722a265d8655
Parents: e7acbce
Author: Alex Harui <aharui@apache.org>
Authored: Tue May 24 09:06:46 2016 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Tue May 24 09:06:46 2016 -0700

----------------------------------------------------------------------
 externs/jquery/build.xml                   | 34 ++++++++++++++++++++++---
 externs/jquery/src/main/patch/jquery.patch | 12 +++++++++
 2 files changed, 42 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/f1928725/externs/jquery/build.xml
----------------------------------------------------------------------
diff --git a/externs/jquery/build.xml b/externs/jquery/build.xml
index bd3421e..9c8ef17 100644
--- a/externs/jquery/build.xml
+++ b/externs/jquery/build.xml
@@ -23,11 +23,37 @@
     
     <target name="main" depends="preprocess, externc, postprocess, compc" />
 
-    <!-- we need to insert a line near the beginning of the file to make the
-         compiler happy. -->
-    <target name="preprocess">
+    <target name="preprocess" depends="download">
+        <exec executable="git" dir="${basedir}/../..">
+            <arg value="apply"/>
+            <arg value="${basedir}/src/main/patch/jquery.patch"/>
+        </exec>
+    </target>
+
+    <target name="make_patch" depends="download">
+        <mkdir dir="${basedir}/target/reference" />
+        <copy todir="${basedir}/target/reference" file="${basedir}/target/downloads/jquery-1.9.js"
/>
+        <!-- we manually edit the jquery file to set the type of the $ const, then run
ant diff -->
+        <!--<antcall target="diff" />-->
+    </target>
+
+    <target name="diff" >
+        <delete dir="${basedir}/src/main/patch" />
+        <mkdir dir="${basedir}/src/main/patch" />
+        <exec executable="git" output="${basedir}/src/main/patch/jquery.patch" >
+            <arg value="diff"/>
+            <arg value="--no-index"/>
+            <arg value="--"/>
+            <arg value="${basedir}/target/reference"/>
+            <arg value="${basedir}/target/downloads"/>
+        </exec>
+        <replace file="${basedir}/src/main/patch/jquery.patch" token="target/reference"
value="target/downloads" />
+        <replace file="${basedir}/src/main/patch/jquery.patch" token="${basedir}/target/downloads"
value="/externs/jquery/target/downloads" />
+    </target>
+
+    <target name="download" >
         <mkdir dir="${basedir}/target/downloads" />
-        <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/externs/jquery-1.9.js"
dest="${basedir}/target/downloads/jquery-1.9.js" skipexisting="true"/>
+        <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/externs/jquery-1.9.js"
dest="${basedir}/target/downloads/jquery-1.9.js"/>
     </target>
     
     <target name="externc" >

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/f1928725/externs/jquery/src/main/patch/jquery.patch
----------------------------------------------------------------------
diff --git a/externs/jquery/src/main/patch/jquery.patch b/externs/jquery/src/main/patch/jquery.patch
new file mode 100644
index 0000000..6e39d18
--- /dev/null
+++ b/externs/jquery/src/main/patch/jquery.patch
@@ -0,0 +1,12 @@
+diff --git a/externs/jquery/target/downloads/jquery-1.9.js b/externs/jquery/target/downloads/jquery-1.9.js
+index d00166a..1d85908 100644
+--- a/externs/jquery/target/downloads/jquery-1.9.js
++++ b/externs/jquery/target/downloads/jquery-1.9.js
+@@ -156,6 +156,7 @@ function jQuery(arg1, arg2) {}
+ 
+ /**
+  * @const
++ * @type {!jQuery}
+  */
+ var $ = jQuery;
+ 


Mime
View raw message