|
1 | 1 | <project name="jQuery" default="jquery" basedir="."> |
2 | 2 |
|
3 | | - <property description="Source Folder" name="SRC_DIR" value="src" /> |
4 | | - <property description="Files for parsing etc." name="BUILD_DIR" value="build" /> |
5 | | - <property description="YUICompressor" name="YUICompressor" value="${BUILD_DIR}/yuicompressor-2.4.2.jar" /> |
6 | | - <loadfile description="Version to build" property="version" srcfile="version.txt" /> |
7 | | - |
8 | | - <property description="Folder for jquery and min target" name="DIST_DIR" value="./dist" /> |
9 | | - |
10 | | - <property name="JQ" value="${DIST_DIR}/jquery.js" /> |
11 | | - <property name="JQ_LITE" value="${DIST_DIR}/jquery.lite.js" /> |
12 | | - <property name="JQ_MIN" value="${DIST_DIR}/jquery.min.js" /> |
13 | 3 | <loadfile property="version" srcfile="version.txt" /> |
| 4 | + <property description="Folder for jquery and min target" name="dist" value="./dist" /> |
| 5 | + |
| 6 | + <property name="JQ" value="${dist}/jquery.js" /> |
| 7 | + <property name="JQ_MIN" value="${dist}/jquery.min.js" /> |
| 8 | + |
14 | 9 | <loadfile property="sizzle-exports" srcfile="src/sizzle-jquery.js" /> |
15 | 10 |
|
16 | 11 | <available property="qunit" file="test/qunit" /> |
|
45 | 40 | <echo message="Building ${JQ}" /> |
46 | 41 | <copy file="src/sizzle/sizzle.js" tofile="src/selector.js" overwrite="true" /> |
47 | 42 | <replaceregexp match="// EXPOSE" replace="${sizzle-exports}" file="src/selector.js" /> |
48 | | - <mkdir dir="${DIST_DIR}" /> |
| 43 | + <mkdir dir="${dist}" /> |
49 | 44 | <concat destfile="${JQ}"> |
50 | | - <fileset dir="${SRC_DIR}" includes="intro.js" /> |
51 | | - <fileset dir="${SRC_DIR}" includes="core.js" /> |
52 | | - <fileset dir="${SRC_DIR}" includes="support.js" /> |
53 | | - <fileset dir="${SRC_DIR}" includes="data.js" /> |
54 | | - <fileset dir="${SRC_DIR}" includes="queue.js" /> |
55 | | - <fileset dir="${SRC_DIR}" includes="event.js" /> |
56 | | - <fileset dir="${SRC_DIR}" includes="selector.js" /> |
57 | | - <fileset dir="${SRC_DIR}" includes="traversing.js" /> |
58 | | - <fileset dir="${SRC_DIR}" includes="attributes.js" /> |
59 | | - <fileset dir="${SRC_DIR}" includes="manipulation.js" /> |
60 | | - <fileset dir="${SRC_DIR}" includes="css.js" /> |
61 | | - <fileset dir="${SRC_DIR}" includes="ajax.js" /> |
62 | | - <fileset dir="${SRC_DIR}" includes="fx.js" /> |
63 | | - <fileset dir="${SRC_DIR}" includes="offset.js" /> |
64 | | - <fileset dir="${SRC_DIR}" includes="dimensions.js" /> |
65 | | - <fileset dir="${SRC_DIR}" includes="outro.js" /> |
| 45 | + <fileset file="src/intro.js" /> |
| 46 | + <fileset file="src/core.js" /> |
| 47 | + <fileset file="src/support.js" /> |
| 48 | + <fileset file="src/data.js" /> |
| 49 | + <fileset file="src/queue.js" /> |
| 50 | + <fileset file="src/event.js" /> |
| 51 | + <fileset file="src/selector.js" /> |
| 52 | + <fileset file="src/traversing.js" /> |
| 53 | + <fileset file="src/attributes.js" /> |
| 54 | + <fileset file="src/manipulation.js" /> |
| 55 | + <fileset file="src/css.js" /> |
| 56 | + <fileset file="src/ajax.js" /> |
| 57 | + <fileset file="src/fx.js" /> |
| 58 | + <fileset file="src/offset.js" /> |
| 59 | + <fileset file="src/dimensions.js" /> |
| 60 | + <fileset file="src/outro.js" /> |
66 | 61 | </concat> |
67 | 62 | <replaceregexp match="@VERSION" replace="${version}" flags="g" byline="true" file="${JQ}" /> |
68 | 63 | <replaceregexp match="Date: " replace="Date: ${date}" file="${JQ}" /> |
|
71 | 66 |
|
72 | 67 | <target name="min" depends="jquery" description="Remove all comments and whitespace, no compression, great in combination with GZip"> |
73 | 68 | <echo message="Building ${JQ_MIN}" /> |
74 | | - <apply executable="java" parallel="false" verbose="true" dest="${DIST_DIR}"> |
75 | | - <fileset dir="${DIST_DIR}"> |
| 69 | + <apply executable="java" parallel="false" verbose="true" dest="${dist}"> |
| 70 | + <fileset dir="${dist}"> |
76 | 71 | <include name="jquery.js" /> |
77 | 72 | </fileset> |
78 | 73 | <arg line="-jar" /> |
79 | | - <arg path="${YUICompressor}" /> |
| 74 | + <arg path="build/yuicompressor-2.4.2.jar" /> |
80 | 75 | <arg value="--charset" /> |
81 | 76 | <arg value="ANSI" /> |
82 | 77 | <arg value="-o" /> |
|
86 | 81 | <echo message="${JQ_MIN} built." /> |
87 | 82 | </target> |
88 | 83 |
|
89 | | - <target name="runtest"> |
90 | | - <echo message="Running Automated Test Suite" /> |
91 | | - <java jar="${JAR}" fork="true"> |
92 | | - <arg value="${BUILD_DIR}/runtest/test.js" /> |
93 | | - </java> |
94 | | - <echo message="Test Suite Finished" /> |
95 | | - </target> |
96 | | - |
97 | 84 | <target name="clean"> |
98 | | - <delete dir="${DIST_DIR}" /> |
| 85 | + <delete dir="${dist}" /> |
99 | 86 | </target> |
100 | 87 |
|
101 | 88 | <target name="openAjaxMetadata"> |
|
0 commit comments