-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
68 lines (57 loc) · 2.54 KB
/
Copy pathbuild.xml
File metadata and controls
68 lines (57 loc) · 2.54 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
63
64
65
66
67
68
<project name = "DijkstraJS" basedir = ".">
<property name = "root" location = "" />
<property name = "js" location = "${root}/js" />
<property name = "tools" location = "${root}/tools" />
<property name = "lib" location = "${root}/lib" />
<property name = "build" location = "${root}/build" />
<property name = "build.js" location = "${build}/js/dijkstra.js" />
<property name = "build.min.js" location = "${build}/js/dijkstra.min.js" />
<taskdef name = "jslint"
classname = "com.googlecode.jslint4java.ant.JSLintTask"
classpath = "${tools}/jslint4java-2.0.3/jslint4java-2.0.3.jar" />
<taskdef name = "jscomp"
classname = "com.google.javascript.jscomp.ant.CompileTask"
classpath = "${tools}/closure/compiler.jar"/>
<target name = "clean">
<delete dir = "${build}"/>
</target>
<target name = "lint">
<echo message = "Running source files through JSLint..."></echo>
<jslint options = "newcap,vars,browser,node">
<formatter type = "plain" />
<predef>dijkstra,$</predef>
<fileset dir = "${js}" includes = "**/*.js" />
</jslint>
</target>
<target name = "test">
<exec dir = "test" executable = "node" failonerror = "true">
<arg value = "run-tests.js"/>
</exec>
</target>
<target name = "concat">
<echo message = "Combining package files..."></echo>
<concat destfile = "${build.js}" encoding = "UTF-8" fixlastline = "true" >
<fileset dir = "${js}" includes = "**/package.js"/>
</concat>
<echo message = "Combining source files..."></echo>
<concat destfile = "${build.js}" encoding = "UTF-8" append="true" fixlastline = "true">
<fileset dir = "${js}" includes = "**/*.js" excludes="**/package.js"/>
</concat>
</target>
<target name="min">
<echo message="Running Google Closure..."></echo>
<jscomp compilationLevel = "simple"
warning = "quiet"
debug = "true"
output = "${build.min.js}">
<sources dir ="${build}/js">
<file name = "dijkstra.js"/>
</sources>
<externs dir = "${lib}">
<file name = "jquery/jquery.js"/>
</externs>
</jscomp>
</target>
<target name = "run" depends = "clean, lint, concat, min" />
<target name = "quick" depends = "clean, concat" />
</project>