This repository was archived by the owner on Jan 19, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathbuild.xml
More file actions
60 lines (53 loc) · 2.57 KB
/
build.xml
File metadata and controls
60 lines (53 loc) · 2.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<project name="TiQuery" default="tiquery" basedir=".">
<!-- setup -->
<property description="Source Folder" name="SRC_DIR" value="src" />
<property description="Files for parsing etc." name="BUILD_DIR" value="build" />
<property description="YUICompressor" name="YUICompressor" value="${BUILD_DIR}/yuicompressor-2.4.2.jar" />
<loadfile description="Version to build" property="version" srcfile="version.txt" />
<property description="Folder for tiquery, min, lite and packed target" name="DIST_DIR" value="./dist" />
<!-- Files names for distribution -->
<property name="TiQ" value="${DIST_DIR}/tiquery.js" />
<property name="TiQ_LITE" value="${DIST_DIR}/tiquery.lite.js" />
<property name="TiQ_MIN" value="${DIST_DIR}/tiquery.min.js" />
<property name="TiQ_PACK" value="${DIST_DIR}/tiquery.pack.js" />
<!-- main build for tiquery -->
<target name="tiquery" description="Main TiQuery build, concatenates source files and replaces @VERSION">
<echo message="Building ${TiQ}" />
<mkdir dir="${DIST_DIR}" />
<concat destfile="${TiQ}">
<fileset dir="${SRC_DIR}" includes="intro.js" />
<fileset dir="${SRC_DIR}" includes="core.js" />
<fileset dir="${SRC_DIR}" includes="events.js" />
<fileset dir="${SRC_DIR}" includes="http.js" />
<fileset dir="${SRC_DIR}" includes="memory.js" />
<fileset dir="${SRC_DIR}" includes="titanium.js" />
<fileset dir="${SRC_DIR}" includes="outro.js" />
</concat>
<replaceregexp match="@VERSION" replace="${version}" flags="g" byline="true" file="${TiQ}" />
<!--replaceregexp match="Date: " replace="Date: ${date}" file="${TiQ}" />
<echo message="${TiQ} built." /-->
</target>
<!-- minified package -->
<target name="min" depends="tiquery" description="Remove all comments and whitespace, no compression, great in combination with GZip">
<echo message="Building ${TiQ_MIN}" />
<apply executable="java" parallel="false" verbose="true" dest="${DIST_DIR}">
<fileset dir="${DIST_DIR}">
<include name="tiquery.js" />
</fileset>
<arg line="-jar" />
<arg path="${YUICompressor}" />
<arg value="--charset" />
<arg value="ANSI" />
<arg value="-o" />
<targetfile />
<mapper type="glob" from="tiquery.js" to="tiquery.min.js" />
</apply>
<echo message="${TiQ_MIN} built." />
</target>
<target name="clean">
<delete dir="${DIST_DIR}" />
</target>
<target name="all" depends="clean,tiquery,min">
<echo message="Build complete." />
</target>
</project>