-
Notifications
You must be signed in to change notification settings - Fork 23
/
project.xml
43 lines (38 loc) · 2.1 KB
/
project.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
<project basedir="." default="dist-jar" name="Viewer Extension Build Script">
<!-- Import properties and targets from stock build script -->
<import file="build.xml" />
<taskdef name="jsmin" classname="net.matthaynes.jsmin.JSMin_Task" classpath="${basedir}/lib/jsmin.0.2.4.jar" />
<target name="build-jar-jscompress" depends="">
<!-- Minify JS -->
<yuicompress fromdir="${res.dir}" todir="${build.jar.dir}/META-INF" excludes="**/*-min.js" warn="${yuicompress.warn}">
<include name="extras/**/*.js" />
<exclude name="extras/components/preview/pdfjs/*" />
</yuicompress>
<!-- There is a bug in yuicompress that breaks get in prototypes
http://yuilibrary.com/projects/yuicompressor/ticket/2528049
Minify JS works, use it for all pdf.js files -->
<jsmin suffix="true" suffixvalue="-min">
<fileset dir="${build.jar.dir}/META-INF/" includes="extras/components/preview/pdfjs/*.js" excludes="**/*-min.js" />
</jsmin>
</target>
<target name="build-zip-tomcat-jscompress">
<!-- Minify JS -->
<yuicompress fromdir="${res.dir}" todir="${build.zip.dir}/${build.res.dir}" excludes="**/*-min.js" warn="${yuicompress.warn}">
<include name="extras/components/**/*.js" />
<exclude name="extras/components/preview/pdfjs/*" />
</yuicompress>
<jsmin suffix="true" suffixvalue="-min">
<fileset dir="${build.zip.dir}/${build.res.dir}" includes="extras/components/preview/pdfjs/*.js" excludes="**/*-min.js" />
</jsmin>
</target>
<target name="build-amp-jscompress">
<!-- Minify JS -->
<yuicompress fromdir="${res.dir}" todir="${build.amp.dir}/web" excludes="**/*-min.js" warn="${yuicompress.warn}">
<include name="**/*.js" />
<exclude name="extras/components/preview/pdfjs/*" />
</yuicompress>
<jsmin suffix="true" suffixvalue="-min">
<fileset dir="${build.amp.dir}/web/" includes="extras/components/preview/pdfjs/*.js" excludes="**/*-min.js" />
</jsmin>
</target>
</project>