This repository has been archived by the owner on Sep 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathbuild.xml
79 lines (64 loc) · 3.19 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
72
73
74
75
76
77
78
79
<project name="Test" default="run-js-commands" basedir="wavemaker-app-runtime-core">
<description>
Grunt and other js utilities which are run with ant
</description>
<target name="cmd-template">
<condition property="cmd.executable" value="cmd" else="${cmd.name}"><os family="windows" /></condition>
<condition property="cmd.argline" value="/c ${cmd.name} ${cmd.arg}" else="${cmd.arg}"><os family="windows" /></condition>
<exec executable="${cmd.executable}" dir="${cmd.executable.dir}" failonerror="true">
<arg line="${cmd.argline}"/>
</exec>
<echo>Ran command "${cmd.executable}" with args "${cmd.argline}" in directory ${cmd.executable.dir}</echo>
</target>
<target name="run-js-commands-local">
<antcall target="cmd-template">
<param name="cmd.name" value="npm"/>
<param name="cmd.arg" value="install"/>
<param name="cmd.executable.dir" value="src/main/webapp"/>
</antcall>
<antcall target="cmd-template">
<param name="cmd.name" value="grunt"/>
<param name="cmd.arg" value="build --no-color"/>
<param name="cmd.executable.dir" value="src/main/webapp"/>
</antcall>
<ant target="merge-ng-runtime-scripts"/>
</target>
<target name="run-js-commands-production">
<!--<antcall target="cmd-template">-->
<!--<param name="cmd.name" value="npm-cache"/>-->
<!--<param name="cmd.arg" value="install --noArchive npm bower --allow-root"/>-->
<!--<param name="cmd.executable.dir" value="src/main/webapp"/>-->
<!--</antcall>-->
<antcall target="cmd-template">
<param name="cmd.name" value="npm"/>
<param name="cmd.arg" value="install"/>
<param name="cmd.executable.dir" value="src/main/webapp"/>
</antcall>
<antcall target="cmd-template">
<param name="cmd.name" value="grunt"/>
<param name="cmd.arg" value="build-prod --no-color"/>
<param name="cmd.executable.dir" value="src/main/webapp"/>
</antcall>
<ant target="merge-ng-runtime-scripts"/>
</target>
<target name="merge-ng-runtime-scripts">
<copy todir="src/main/webapp/tmp/merged/application/scripts">
<fileset dir="../wavemaker-ng-runtime/dist/bundles/wmapp/scripts"/>
</copy>
<copy todir="src/main/webapp/tmp/merged/application/locales">
<fileset dir="../wavemaker-ng-runtime/dist/bundles/wmapp/locales"/>
</copy>
<copy todir="src/main/webapp/tmp/merged/application/styles">
<fileset dir="src/main/webapp/application/styles"/>
</copy>
<copy todir="src/main/webapp/tmp/merged/mobile/scripts">
<fileset dir="../wavemaker-ng-runtime/dist/bundles/wmmobile/scripts"/>
</copy>
<copy todir="src/main/webapp/tmp/merged/mobile/locales">
<fileset dir="../wavemaker-ng-runtime/dist/bundles/wmmobile/locales"/>
</copy>
<copy todir="src/main/webapp/tmp/merged/mobile/styles">
<fileset dir="src/main/webapp/mobile/styles"/>
</copy>
</target>
</project>