forked from kort/kort-home
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
50 lines (43 loc) · 1.39 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
<project name="kort-build" basedir="." default="build">
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
<pathelement location="lib/antlibs/ant-contrib-1.0b3.jar"/>
</classpath>
</taskdef>
<property environment="env"/>
<property name="php.dir" value="php" />
<target name="build" depends="css,lint">
<echo message="BUILD FINISHED!"/>
</target>
<target name="lint">
<antcall target="php-lint"/>
</target>
<target name="php-lint">
<echo message="Linting PHP files"/>
<exec executable="bin/phpcs">
<arg value="--standard=code_standard.xml"/>
<arg value="--report-width=60"/>
<arg value="${php.dir}"/>
</exec>
</target>
<target name="css">
<echo message="Compile sass files to css"/>
<foreach target="compile_sass" param="dir">
<path>
<dirset dir="${basedir}">
<include name="**/styles"/>
</dirset>
</path>
</foreach>
</target>
<target name="compile_sass">
<echo message="Compile sass files in ${dir}"/>
<apply executable="sass" dest="${dir}" verbose="true" force="true" failonerror="true">
<arg value="--unix-newlines" />
<srcfile />
<targetfile />
<fileset dir="${dir}" includes="**/*.scss" />
<mapper type="glob" from="*.scss" to="*.css"/>
</apply>
</target>
</project>