Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 114 lines (83 sloc) 2.775 kB
880be4b @tipiirai rest of the files
tipiirai authored
1 <project name="jQuery.Tools" default="min">
2
ca3e6df learning git.
Tero Piirainen authored
3 <taskdef resource="net/sf/antcontrib/antlib.xml"/>
85655d7 @tipiirai better handling of min/max dates in selectors
tipiirai authored
4 <property name="version" value="1.2.5"/>
92ebbb3 @tipiirai removed build.properties and merged logic into build.xml
tipiirai authored
5 <property name="build" value="build/${version}"/>
a24819b all tools passes JSLint (as much as possible). build.xml supports lin…
Tero Piirainen authored
6 <property name="file" value="none"/>
880be4b @tipiirai rest of the files
tipiirai authored
7
e028661 build handles source code too (tags version and date)
Tero Piirainen authored
8 <!-- replace @VERSION and @DATE tags -->
9 <target name="sources">
10
11 <!-- copy sources to build directory -->
12 <mkdir dir="${build}"/>
13 <copy todir="${build}">
14 <fileset dir="src"/>
ca3e6df learning git.
Tero Piirainen authored
15 </copy>
dc92cde added jQuery files to lib and changed build.xml to include them to th…
Tero Piirainen authored
16
17 <!-- jQuery library -->
18 <copy todir="${build}">
19 <fileset dir="lib" includes="*.js"/>
20 </copy>
21
22
e028661 build handles source code too (tags version and date)
Tero Piirainen authored
23
24 <!-- loop trough them -->
ca3e6df learning git.
Tero Piirainen authored
25 <for param="file">
880be4b @tipiirai rest of the files
tipiirai authored
26 <path>
e028661 build handles source code too (tags version and date)
Tero Piirainen authored
27 <fileset dir="${build}" includes="*/*.js" excludes="*/*.min.js"/>
880be4b @tipiirai rest of the files
tipiirai authored
28 </path>
29
30 <sequential>
ca3e6df learning git.
Tero Piirainen authored
31
a41ebc7 Separate www and jquerytools build. Removed individual version number…
Tero Piirainen authored
32 <!-- version number -->
92ebbb3 @tipiirai removed build.properties and merged logic into build.xml
tipiirai authored
33 <replaceregexp match="@VERSION" replace="${version}" byline="true" file="@{file}" />
ca3e6df learning git.
Tero Piirainen authored
34
35 <!-- last modified (via <git log> command) -->
e028661 build handles source code too (tags version and date)
Tero Piirainen authored
36 <propertyregex property="source" input="@{file}" override="yes" replace="\1"
37 regexp=".+/\d.\d.\d/(.*)\.js"/>
ca3e6df learning git.
Tero Piirainen authored
38
39 <exec executable="git" outputproperty="git.log" >
a41ebc7 Separate www and jquerytools build. Removed individual version number…
Tero Piirainen authored
40 <arg line="log -1 src/${source}.js"/>
e028661 build handles source code too (tags version and date)
Tero Piirainen authored
41 </exec>
42
ca3e6df learning git.
Tero Piirainen authored
43 <propertyregex property="date" input="${git.log}" select="\1">
44 <regexp pattern="Date:(.+)"/>
45 </propertyregex>
46
47 <replaceregexp match="@DATE" replace="${date}" file="@{file}" />
880be4b @tipiirai rest of the files
tipiirai authored
48
49 </sequential>
50 </for>
e028661 build handles source code too (tags version and date)
Tero Piirainen authored
51 </target>
52
53
54 <!-- minify with Closure Compiler (default mode) -->
55 <target name="min" depends="sources">
56
57 <!-- do the hard work -->
58 <apply
59 executable="java"
60 parallel="false"
61 verbose="true"
62 dest="${build}">
63
64 <fileset dir="${build}" includes="*/*.js" excludes="*/*.min.js"/>
65 <arg line="-jar"/>
66 <arg path="lib/compiler.jar"/>
67 <arg line="--js"/>
68 <srcfile/>
69 <arg line="--js_output_file"/>
70 <mapper type="glob" from="*.js" to="*.min.js"/>
71 <targetfile/>
72 </apply>
880be4b @tipiirai rest of the files
tipiirai authored
73
e028661 build handles source code too (tags version and date)
Tero Piirainen authored
74 </target>
75
a24819b all tools passes JSLint (as much as possible). build.xml supports lin…
Tero Piirainen authored
76 <!-- lint (http://www.jslint.com/lint.html) -->
77 <target name="lint">
78 <if>
79 <equals arg1="${file}" arg2="none" />
80
81 <!-- loop trough all files -->
82 <then>
83 <for param="file">
84 <path>
85 <fileset dir="src" includes="**/*.js"/>
86 </path>
87
88 <sequential>
89 <java jar="lib/rhino.jar" fork="true">
90 <arg value="lib/jslint.js" />
91 <arg value="@{file}" />
92 </java>
93 </sequential>
94 </for>
95 </then>
96
5ea29c4 few bug findings. last deletions of the lazyload to be introduced later
Tero Piirainen authored
97 <!-- ant lint -Dfile=validator/validator.js -->
a24819b all tools passes JSLint (as much as possible). build.xml supports lin…
Tero Piirainen authored
98 <else>
1b0546c removed src/1.3.0 in favor of a new branch. JSLint support to build.xml
Tero Piirainen authored
99 <java jar="lib/rhino.jar" fork="true">
100 <arg value="lib/jslint.js" />
a24819b all tools passes JSLint (as much as possible). build.xml supports lin…
Tero Piirainen authored
101 <arg value="src/${file}" />
1b0546c removed src/1.3.0 in favor of a new branch. JSLint support to build.xml
Tero Piirainen authored
102 </java>
a24819b all tools passes JSLint (as much as possible). build.xml supports lin…
Tero Piirainen authored
103 </else>
104
105 </if>
106
107 </target>
1b0546c removed src/1.3.0 in favor of a new branch. JSLint support to build.xml
Tero Piirainen authored
108
880be4b @tipiirai rest of the files
tipiirai authored
109 </project>
110
111
112
113
Something went wrong with that request. Please try again.