-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
68 lines (58 loc) · 2.7 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="Full Metal Jewelry" description="A website to sell maille trinkets" default="build">
<property file="build.properties" />
<target name="build" description="Build the application" depends="clean,-prepare,css" />
<target name="-prepare">
<mkdir dir="${project.basedir}/build" />
</target>
<target name="clean" description="Clean cache files">
<delete>
<fileset dir="${project.basedir}/www/app/tmp/cache">
<include name="models/cake_*" />
<include name="persistent/cake_*" />
</fileset>
</delete>
<delete dir="${project.basedir}/build" includeemptydirs="true" />
</target>
<target name="-css-check" unless="css.force">
<uptodate property="css.uptodate">
<fileset dir="${sass.assetdir}">
<include name="*.scss" />
<exclude name="_*.scss" />
</fileset>
<mapper type="glob" from="*.scss" to="${sass.builddir}/*.css" />
</uptodate>
</target>
<target name="css" depends="-css-check,-prepare" unless="css.uptodate" description="Build CSS assets">
<!-- Create directory because it may not exist in a fresh checkout -->
<mkdir dir="${sass.builddir}" />
<!-- Compile SASS/SCSS -->
<echo msg="${sass.bin} --style ${sass.style} --cache-location ${sass.cachedir} --update ${sass.assetdir}:${sass.builddir}" />
<exec command="${sass.bin} --style ${sass.style} --cache-location ${sass.cachedir} --update ${sass.assetdir}:${sass.builddir}"
dir="${project.basedir}"
logoutput="true"
checkreturn="true"
/>
<echo message="Rebuilt CSS assets" />
</target>
<target name="-js-check" unless="js.force">
<uptodate property="js.uptodate" targetfile="${js.builddir}/main.js">
<fileset dir="${js.assetdir}">
<include name="*.js" />
</fileset>
</uptodate>
</target>
<target name="js" depends="-js-check,-prepare" unless="js.uptodate" description="Build JS assets">
<delete file="${js.builddir}/main.js" />
<includepath classpath="${js.classpath}" />
<append destFile="${js.builddir}/main.js">
<filterchain>
<filterreader classname="phing.filters.YuiCompressorFilter">
<param name="type" value="js" />
</filterreader>
</filterchain>
<filelist dir="${js.assetdir}" files="jquery.fancybox-1.3.4.js,jquery.easing-1.3.js,jquery.mousewheel-3.0.4.js" />
</append>
<echo message="Rebuilt JS assets" />
</target>
</project>