-
Notifications
You must be signed in to change notification settings - Fork 95
/
build.xml
40 lines (35 loc) · 1.42 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
<?xml version="1.0"?>
<project basedir="." default="all">
<taskdef name="closure" classname="com.google.javascript.jscomp.ant.CompileTask" classpath="lib/closure/compiler.jar" />
<target name="init">
<echo message="Building..." />
<property name="lib.dir" value="${basedir}/lib" />
<property name="src.dir" value="${basedir}" />
<property name="test.dir" value="${basedir}/test" />
<property name="build.dir" value="${basedir}" />
</target>
<target name="jslint" depends="init" description="Check JS with JSLint">
<echo message="Running JSLint static analysis..." />
<java jar="${lib.dir}/rhino/js.jar" fork="true">
<arg value="${test.dir}/lint.js" />
</java>
<echo message="JSLint static analysis done." />
</target>
<target name="compile.js" depends="jslint" description="Compile JS">
<echo message="Compiling script..." />
<closure compilationLevel="simple" warning="verbose" debug="false" output="${build.dir}/countdown.min.js">
<sources dir="${build.dir}">
<file name="externs.js"/>
<file name="countdown.js"/>
</sources>
</closure>
<echo message="Script compilation done." />
</target>
<target name="all" depends="compile.js">
<echo message="Build completed." />
<concat destfile="${build.dir}/countdown.demo.js">
<fileset file="${build.dir}/antixss.js" />
<fileset file="${build.dir}/countdown.min.js" />
</concat>
</target>
</project>