-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
135 lines (118 loc) · 3.95 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<?xml version="1.0"?>
<project basedir="." name="Compress and Concatenate CSS and JS" default="initialize">
<property name="src" location="${basedir}\src"/>
<property name="build" location="${basedir}\build"/>
<property name="dist" location="${basedir}\dist"/>
<target name="concat_css">
<concat destfile="${dist}\css\style.css">
<filelist id="files" dir="${src}\css">
<file name="normalize.css" />
<file name="main.css" />
<file name="shadowbox.css" />
</filelist>
</concat>
</target>
<target name="compress_css" depends="concat_css">
<property name="file" value="${dist}\css\style" />
<property name="ext" value="css" />
<echo>${file}.${ext}</echo>
<java jar="${build}/yuicompressor-2.4.7.jar" fork="true">
<arg line="--line-break 0"/>
<arg value="${file}.${ext}" />
<arg value="-o" />
<arg value="${file}.min.${ext}" />
</java>
</target>
<target name="concat_js">
<concat destfile="${dist}\js\script.js">
<filelist id="files" dir="${src}\js">
<!--<file name="vendor/plugins/CSSPlugin.min.js" />
<file name="vendor/easing/EasePack.min.js" />
<file name="vendor/TweenLite.min.js" />
<file name="vendor/jquery.simplemodal-1.4.4.js" />
<file name="vendor/jquery.gsap.min.js" />-->
<file name="vendor/shadowbox.js" />
<file name="vendor/shadowbox/intro.js" />
<file name="vendor/shadowbox/core.js" />
<file name="vendor/shadowbox/load.js" />
<file name="vendor/shadowbox/plugins.js" />
<file name="vendor/shadowbox/cache.js" />
<file name="vendor/shadowbox/players/html.js" />
<file name="vendor/shadowbox/players/iframe.js" />
<file name="vendor/shadowbox/players/img.js" />
<file name="vendor/shadowbox/skin.js" />
<file name="vendor/shadowbox/outro.js" />
<file name="plugins.js" />
<file name="main.js" />
<file name="model\RecipeProxy.js" />
<file name="view\HeaderMediator.js" />
<file name="view\EditScreenMediator.js" />
<file name="view\DisplayScreenMediator.js" />
<file name="view\ModalMediator.js" />
<file name="view\ModalImageMediator.js" />
</filelist>
</concat>
</target>
<target name="compress_js" depends="concat_js">
<property name="file" value="${dist}\js\script" />
<property name="ext" value="js" />
<echo>${file}.${ext}</echo>
<java jar="${build}\yuicompressor-2.4.7.jar" fork="true">
<arg value="${file}.${ext}" />
<arg value="-o" />
<arg value="${file}.min.${ext}" />
</java>
</target>
<target name="compress">
<java jar="${build}\yuicompressor-2.4.7.jar" fork="true">
<!-- <arg line="- -line-break 0"/> -->
<arg value="${file}.${ext}" />
<!--<srcfile />-->
<arg value="-o" />
<arg value="${file}.min.${ext}" />
<!--<mapper type="glob" from="*.${ext}" to="*-min.${ext}"/>
<targetfile/>-->
</java>
<echo>${file}.${ext}</echo>
</target>
<!-- Minify HTML -->
<target name="compress_html">
<apply executable="java" parallel="false">
<fileset dir="${src}" includes="*.html"></fileset>
<arg value="-jar"/>
<arg path="${build}\htmlcompressor-1.5.3.jar"/>
<arg line="--type html"/>
<srcfile/>
<arg value="-o"/>
<mapper type="glob" from="*" to="${dist}\*"/>
<targetfile/>
</apply>
</target>
<!--<target name="upload_files" depends="initialize">
<ftp server="treasuredtruth.ca"
userid="treasuredtruth_ca_admin"
password="IB7ISDZKFQ"
port="21"
remotedir="/public_html"
passive="yes"
binary="no">
<fileset dir=".">
<include name="assets/*" />
<include name="index.html" />
</fileset>
</ftp>
</target>-->
<target name="initialize" >
<mkdir dir="${dist}"/>
<mkdir dir="${dist}/js"/>
<mkdir dir="${dist}/css"/>
<mkdir dir="${dist}/img"/>
<!--<antcall target="compress_css" />-->
<antcall target="concat_css" />
<antcall target="compress_js" />
<!--<antcall target="compress_html" />-->
<copy file="${src}\index.html" todir="${dist}"/>
<echo>Done!</echo>
<sleep seconds="10"/>
</target>
</project>