-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
62 lines (47 loc) · 1.71 KB
/
Copy pathbuild.xml
File metadata and controls
62 lines (47 loc) · 1.71 KB
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
<?xml version="1.0" encoding="utf-8"?>
<project name="happyText" default="">
<loadproperties srcfile="build.properties" />
<loadfile property="license" srcfile="license.txt" />
<tstamp>
<format property="build.time"
pattern="MMMM d, yyyy hh:mm:ss"
locale="en,US"/>
</tstamp>
<!-- initialization and cleanup -->
<target name="init">
<mkdir dir="${build.dir}"/>
</target>
<target name="clean">
<delete dir="${build.dir}"/>
</target>
<!-- Define the task -->
<taskdef name="jshint" classname="com.philmander.jshint.JsHintAntTask"
classpath="${jshint}" />
<taskdef name="jsmin"
classname="net.matthaynes.jsmin.JSMin_Task"
classpath="${jsmin}"/>
<target name="validate" depends="clean,init">
<!-- Lint the code -->
<jshint dir="${src.dir}" includes="**/*.js" options="${jshint.options}" >
<report type="plain" destFile="${build.dir}/lintReport.txt" />
</jshint>
</target>
<target name="minify">
<apply executable="java" failonerror="true">
<fileset dir="${src.dir}" includes="*.js"/>
<mapper type="glob" from="*.js" to="${build.dir}/*-min.js"/>
<arg line="-jar"/>
<arg path="${closure}"/>
<arg line="${closure.options}"/>
<arg line="--js"/>
<srcfile/>
<arg line="--js_output_file"/>
<targetfile/>
</apply>
</target>
<target name="minify_jsmin" depends="clean,init">
<jsmin destdir="${build.dir}">
<fileset dir="${src.dir}/" includes="**/*.js"/>
</jsmin>
</target>
</project>