-
Notifications
You must be signed in to change notification settings - Fork 15
/
build.xml
68 lines (56 loc) · 2.31 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
<project name="jsql" default="concatenate">
<property name="version" value="0.7.1" />
<property name="build.dir" value="./build/" />
<property name="src.dir" value="./src/" />
<property name="uglifyjs.options" value="--no-mangle-functions" />
<tstamp>
<format property="build.time"
pattern="MMMM d, yyyy hh:mm:ss"
locale="en,US"/>
</tstamp>
<target name="concatenate">
<loadfile property="license" srcfile="LICENSE.md" />
<concat destfile="${build.dir}/jsql.js" fixlastline="yes" eol="lf">
<header trimleading="yes">
/*!
${license}
*/
</header>
<footer>/* Build Time: ${build.time} */</footer>
<filelist dir="${src.dir}" files="jsql.js,reqwest.js,events.js" />
</concat>
<echo>concatenate complete!</echo>
<replaceregexp match="@VERSION@" replace="${version}" flags="g" byline="true">
<fileset dir="${build.dir}" includes="**/*"/>
</replaceregexp>
<echo>version replace complete!</echo>
</target>
<target name="minify">
<apply executable="uglifyjs" failonerror="true">
<fileset dir="${build.dir}" includes="jsql.js"/>
<mapper type="glob" from="*.js" to="${build.dir}/*-min.js"/>
<arg line="${uglifyjs.options}"/>
<arg line="-o"/>
<targetfile/>
<srcfile/>
</apply>
<echo>minify complete!</echo>
</target>
<target name="kissy">
<loadfile property="license" srcfile="LICENSE.md" />
<concat destfile="${build.dir}/kissy-wrapper/index.js" fixlastline="yes" eol="lf">
<header trimleading="yes">
/*!
${license}
*/
</header>
<footer>/* Build Time: ${build.time} */</footer>
<filelist dir="${src.dir}" files="kissy-wrapper/index.pre.js,jsql.js,reqwest.js,events.js,kissy-wrapper/index.post.js" />
</concat>
<echo>concatenate complete!</echo>
<replaceregexp match="@VERSION@" replace="${version}" flags="g" byline="true">
<fileset dir="${build.dir}" includes="**/*"/>
</replaceregexp>
<echo>version replace complete!</echo>
</target>
</project>