forked from zepheira/simile-ajax
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
71 lines (61 loc) · 2.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
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
71
<!--+
|
| +==============================+
| | SimileAjax Build System |
| +==============================+
|
| This is just for bundling and minifying javascript and CSS files.
|
+-->
<project default="publish-local" basedir="." name="SimileAjax">
<property name="webapp.dir" value="src/webapp"/>
<property name="api.dir" value="${webapp.dir}/api"/>
<property name="site.dir" value="${webapp.dir}/site"/>
<property name="scripts.dir" value="${api.dir}/scripts"/>
<property name="docs.dir" value="${site.dir}/docs"/>
<property name="jsdoc.dir" value="tools/jsdoc"/>
<property name="rjs.dir" value="optimize"/>
<property name="build.dir" value="build"/>
<target name="bundle">
<exec dir="." executable="node">
<arg line="${rjs.dir}/r.js -o ${rjs.dir}/build.js"/>
</exec>
</target>
<target name="bundle-require">
<exec dir="." executable="node">
<arg line="${rjs.dir}/r.js -o ${rjs.dir}/build-require.js"/>
</exec>
</target>
<target name="bundle-css">
<exec dir="." executable="node">
<arg line="${rjs.dir}/r.js -o ${rjs.dir}/build-css.js"/>
</exec>
</target>
<target name="bundle-debug">
<exec dir="." executable="node">
<arg line="${rjs.dir}/r.js -o ${rjs.dir}/build.js optimize=none out=build/simile-ajax-api-debug.js"/>
</exec>
<copy file="${build.dir}/simile-ajax-api-debug.js" todir="${api.dir}"/>
</target>
<target name="bundle-all" depends="bundle,bundle-require,bundle-css" />
<target name="publish-local" depends="bundle-all">
<copy file="${build.dir}/simile-ajax-api.js" todir="${api.dir}"/>
<copy file="${build.dir}/simile-ajax-bundle.js" todir="${api.dir}"/>
<copy file="${build.dir}/simile-ajax-bundle.css" todir="${api.dir}/styles"/>
</target>
<target name="docs">
<java jar="${jsdoc.dir}/app/js.jar" fork="true" dir="${jsdoc.dir}">
<arg value="app/run.js"/>
<arg value="-t=templates/html"/>
<arg value="-r"/>
<arg value="-d=../../${docs.dir}"/>
<arg value="../../src"/>
</java>
</target>
<target name="clean">
<delete dir="${build.dir}"/>
<delete file="${api.dir}/simile-ajax-api.js"/>
<delete file="${api.dir}/simile-ajax-bundle.js"/>
<delete file="${api.dir}/styles/simile-ajax-bundle.css"/>
</target>
</project>