forked from ysimonson/node-bus
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
70 lines (57 loc) · 2.24 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="node-bus" basedir="." default="node-bus">
<property name="version" value="0.6a" />
<property name="build.dir" value="./build" />
<property name="client.build.dir" value="${build.dir}/client" />
<property name="server.build.dir" value="${build.dir}/server" />
<!-- Taskdef for jsmin -->
<taskdef name="jsmin" classname="net.matthaynes.jsmin.JSMin_Task" classpath="./tools/jsmin.0.2.4.jar"/>
<loadfile property="copyright" srcFile="${basedir}/LICENSE"/>
<echo>====================================================================
Project: ${ant.project.name}
Version: ${version}
Base Directory: ${basedir}
====================================================================</echo>
<target name="clean">
<delete dir="${build.dir}" />
</target>
<target name="buildClient">
<mkdir dir="${client.build.dir}" />
<concat destfile="${client.build.dir}/bus.client.js" fixlastline="true" force="yes">
<string value="/*${copyright}*/" />
<path>
<pathelement location="./src/shared/util.js"/>
<pathelement location="./src/client/bus.client.js"/>
</path>
</concat>
<jsmin destdir="${client.build.dir}" srcfile="${client.build.dir}/bus.client.js" suffix="true" copyright="${copyright}" />
<copy todir="${client.build.dir}/socket.io/">
<fileset dir="./src/client/lib/socket.io-client/">
<include name="dist/**" />
</fileset>
</copy>
</target>
<target name="buildServer">
<mkdir dir="${server.build.dir}" />
<concat destfile="${server.build.dir}/bus.server.js" fixlastline="true" force="yes">
<string value="/*${copyright}*/" />
<path>
<pathelement location="./src/shared/util.js"/>
<pathelement location="./src/server/bus.server.js"/>
</path>
</concat>
</target>
<target name="build">
<mkdir dir="${build.dir}" />
<antcall target="buildClient" />
<antcall target="buildServer" />
</target>
<target name="node-bus" depends="clean,build">
<copy todir="./apps/static/lib/node-bus">
<fileset dir="${client.build.dir}" />
</copy>
<copy todir="./apps/lib/node-bus">
<fileset dir="${server.build.dir}" />
</copy>
</target>
</project>