forked from Chielus/InfoScreen
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.xml
116 lines (103 loc) · 3.35 KB
/
build.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<?xml version="1.0"?>
<project name="FlatTurtle Apache Ant build script" default="initialize">
<!--
*************************************************
* PROPERTIES *
*************************************************
-->
<property name="template_dir" value="templates/default" />
<property name="core_dir" value="core" />
<property name="css_dir" value="${template_dir}/css" />
<property name="js_dir" value="${template_dir}/js" />
<!--
*************************************************
* YUI COMPRESSOR *
*************************************************
-->
<target name="compress">
<java jar="tools/yuicompressor.jar" fork="true">
<arg value="${file}" />
<arg value="-o" />
<arg value="${file}" />
</java>
<echo>${file}</echo>
</target>
<!--
*************************************************
* TEMPLATE STYLESHEET *
*************************************************
-->
<target name="concat_css">
<concat destfile="${css_dir}/style.min.css">
<filelist id="files" dir="${css_dir}">
<file name="style.css" />
</filelist>
</concat>
</target>
<target name="compress_css" depends="concat_css">
<antcall target="compress">
<param name="file" value="${css_dir}/style.min.css" />
</antcall>
</target>
<!--
*************************************************
* TEMPLATE JAVASCRIPT *
*************************************************
-->
<target name="concat_js">
<concat destfile="${js_dir}/application.min.js">
<filelist id="files" dir="${js_dir}">
<file name="libs/jquery.tmpl.js" />
<file name="turtles.loader.js" />
</filelist>
</concat>
</target>
<target name="concat_plugins">
<concat destfile="${js_dir}/plugins.min.js">
<fileset id="files" dir="${js_dir}/plugins" includes="*.js" />
</concat>
</target>
<target name="compress_js" depends="concat_js">
<antcall target="compress">
<param name="file" value="${js_dir}/application.min.js" />
</antcall>
</target>
<target name="compress_plugins" depends="concat_plugins">
<antcall target="compress">
<param name="file" value="${js_dir}/plugins.min.js" />
</antcall>
</target>
<!--
*************************************************
* CORE JAVASCRIPT *
*************************************************
-->
<target name="concat_core">
<concat destfile="${core_dir}/core.min.js">
<filelist id="files" dir="${core_dir}">
<file name="underscore.js" />
<file name="jquery.js" />
<file name="backbone.js" />
<file name="turtles.js" />
<file name="jobs.js" />
</filelist>
</concat>
</target>
<target name="compress_core" depends="concat_core">
<antcall target="compress">
<param name="file" value="${core_dir}/core.min.js" />
</antcall>
</target>
<!--
*************************************************
* INITIALIZE *
*************************************************
-->
<target name="initialize">
<antcall target="compress_core" />
<antcall target="compress_css" />
<antcall target="compress_js" />
<antcall target="compress_plugins" />
<echo>Done!</echo>
</target>
</project>