-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.xml
47 lines (42 loc) · 1.32 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
<?xml version="1.0" encoding="utf-8"?>
<project name="PROJECT_NAME">
<!-- properties -->
<property name="r.js" value="tools/r.js" />
<property name="closure.jar" value="tools/compiler.jar" />
<property name="rhino.jar" value="tools/js.jar" />
<property name="build.js" value="tools/build.js" />
<property name="build.dir" value="build" />
<property name="deploy.path" value="./deploy" />
<target name="all" depends="build,deploy" />
<target name="clean">
<delete dir="${build.dir}" />
</target>
<target name="build" depends="clean">
<java classname="org.mozilla.javascript.tools.shell.Main">
<classpath>
<pathelement location="${rhino.jar}" />
<pathelement location="${closure.jar}" />
</classpath>
<arg value="${r.js}" />
<arg value="-o" />
<arg value="${build.js}" />
</java>
</target>
<target name="deploy">
<delete includeemptydirs="true">
<fileset dir="${deploy.path}" includes="**/*" />
</delete>
<copy todir="${deploy.path}">
<fileset dir="${build.dir}">
<include name="**/*.*" />
<exclude name="**/thumbs.db" />
<exclude name="img/src/*.*" />
<exclude name="img/nodeploy/*.*" />
</fileset>
</copy>
<replaceregexp file="${deploy.path}/index.html"
match="<div [^>]*nodeploy>[^<]*</div>"
replace="" byline="true"
/>
</target>
</project>