-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbase-common.xml
83 lines (73 loc) · 3.44 KB
/
base-common.xml
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!-- vim: set ft=ant : -->
<project name="base_common">
<dirname property="root.dir" file="${ant.file.base_common}" />
<property name="tools.dir" location="${root.dir}/tools" />
<property name="tools.yuicompressor" location="${tools.dir}/yuicompressor-2.4.7.jar" />
<property name="tools.underscore" location="${tools.dir}/underscore.js" />
<property name="tools.jshint" location="${tools.dir}/ant-jshint-0.3.6-SNAPSHOT-deps.jar" />
<property name="tools.pngtastic" location="${tools.dir}/pngtastic-0.5.jar" />
<property name="tools.antcontrib" location="${tools.dir}/ant-contrib-1.0b3.jar" />
<taskdef name="jshint" classname="com.philmander.jshint.JsHintAntTask"
classpath="${tools.jshint}" />
<taskdef name="pngtastic" classname="com.googlecode.pngtastic.ant.PngOptimizerTask"
classpath="${tools.pngtastic}" />
<taskdef resource="net/sf/antcontrib/antlib.xml"
classpath="${tools.antcontrib}" />
<!-- Properties -->
<property file="${root.dir}/global.properties" />
<include file="${root.dir}/paths.xml" />
<include file="${root.dir}/util.xml" />
<target name="templates">
<if>
<not>
<uptodate targetfile="${listit.templates.file}">
<srcfiles dir="${listit.templates.dir}" includes="**/*.html" excludes="platforms/"/>
</uptodate>
</not>
<then>
<jstmpl output="${listit.templates.file}" object="ListIt.templates">
<fileset dir="${listit.templates.dir}" includes="**/*.html" excludes="platforms/"/>
</jstmpl>
</then>
</if>
<for param="platformDir">
<dirset erroronmissingdir="false" dir="${listit.templates.dir}/platforms/" includes="*/"/>
<sequential>
<local name="platform" />
<local name="output_file" />
<basename property="platform" file="@{platformDir}" />
<property name="output_file" location="${listit.js.platforms.dir}/${platform}/templates.js" />
<if>
<not>
<uptodate targetfile="${output_file}">
<srcfiles dir="@{platformDir}" includes="**/*.html" />
</uptodate>
</not>
<then>
<mkdir dir="${listit.js.platforms.dir}/${platform}/" />
<jstmpl output="${output_file}" object="ListIt.templates">
<fileset dir="@{platformDir}" includes="**/*.html" />
</jstmpl>
</then>
</if>
</sequential>
</for>
</target>
<target name="jshint">
<local name="globals_file" />
<local name="options_file" />
<property name="globals_file" location="${tools.dir}/jshint-globals.properties" />
<property name="options_file" location="${tools.dir}/jshint-options.properties" />
<jshint
dir="${listit.js.dir}"
fail="${build.is.mode.release}"
globalsFile="${globals_file}"
optionsFile="${options_file}">
<include name="**/*.js" />
<exclude name="templates.js" />
<exclude name="platforms/*/templates.js" />
<exclude name="defines-debug.js" />
<exclude name="libs/**" />
</jshint>
</target>
</project>