-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.xml
More file actions
executable file
·69 lines (56 loc) · 3.58 KB
/
build.xml
File metadata and controls
executable file
·69 lines (56 loc) · 3.58 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
69
<?xml version="1.0" encoding="UTF-8"?>
<project default="help" name="app-template">
<xmlproperty file="expath-pkg.xml"/>
<!--<property name="app.name" value=""/>-->
<property name="project.version" value="${package(version)}"/>
<property name="project.app" value="${package(abbrev)}"/>
<property name="build.dir" value="build"/>
<target name="help" description="display short hint to run 'ant -p'">
<echo>Welcome to thte existdb-login build script!</echo>
<echo></echo>
<echo>To learn more about the available build targets run 'ant -p'</echo>
</target>
<target name="prepare" description="copy actual web components into bower_components dir to avoid path referencing problems.">
<mkdir dir="${basedir}/bower_components/${package(abbrev)}"/>
<copy todir="${basedir}/bower_components/${package(abbrev)}">
<fileset dir="${basedir}" includes="*-*.html"/>
</copy>
</target>
<target name="xar" depends="prepare" description="creates ${build.dir} zips contents of main directory excluding bower.json.ignores build.xml ${build.dir}/**, node_modules/**, doc/**, gulpfile.js, package.json; depends on 'prepare'">
<mkdir dir="${build.dir}"/>
<zip basedir="." destfile="${build.dir}/${project.app}-${project.version}.xar" excludes="bower.json.ignores build.xml ${build.dir}/**, node_modules/**, doc/**, gulpfile.js, package.json"/>
</target>
<target name="clean-polymer-build" description="cleans the Polymer build directories ('unbundled' and 'bundled' in ${build.dir})">
<delete dir="${build.dir}/unbundled"/>
<delete dir="${build.dir}/bundled"/>
</target>
<target name="polymer-build-production" depends="clean-polymer-build" description="produces a production version for Polymer apps. This will compress all imported web components into a single html. This is highly advisable for final distributions as it boils down the package dramatically. Note: in the context of a single component this target might be of minor importance but is put here for usage in your own projects. depends on 'clean-polymer-build'.">
<exec executable="polymer">
<arg value="build"/>
<arg value="--bundle"/>
<arg value="--entrypoint"/>
<arg value="login.html"/>
</exec>
</target>
<target name="production-xar" depends="polymer-build-production" description="creates a xar file with optimized Polymer components">
<mkdir dir="${build.dir}"/>
<copy file="controller.xql" todir="${build.dir}/bundled"/>
<copy file="expath-pkg.xml" todir="${build.dir}/bundled"/>
<copy file="configuration.xml" todir="${build.dir}/bundled"/>
<copy file="repo.xml" todir="${build.dir}/bundled"/>
<copy file="icon.png" todir="${build.dir}/bundled"/>
<copydir src="${basedir}/modules" dest="${build.dir}/bundled/modules" />
<copydir src="${basedir}/resources" dest="${build.dir}/bundled/resources" />
<zip basedir="${build.dir}/bundled" destfile="${build.dir}/${project.app}-${project.version}-prod.xar" excludes="demo"/>
</target>
<target name="init" description="This should be called once you have unpacked the template app to start your own application.">
<input
message="Please enter new app name:"
addproperty="app.name"
/>
<echo message="${app.name}"></echo>
<replace dir="${basedir}" includes="**/*.*" excludes="build.xml"
token="app-template"
value="${app.name}"/>
</target>
</project>