You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2016/05/25 18:25:15 UTC
[08/19] git commit: [flex-falcon] [refs/heads/develop] - patch $
command in jquery
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/3eb857ae
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/3eb857ae
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/3eb857ae
Branch: refs/heads/develop
Commit: 3eb857aea10dd06320bea982debcfd32bf225a80
Parents: a45c00a
Author: Alex Harui <ah...@apache.org>
Authored: Tue May 24 09:06:46 2016 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue May 24 21:07:12 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/3eb857ae/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/3eb857ae/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;
+