aboutsummaryrefslogtreecommitdiff
path: root/build.xml
diff options
context:
space:
mode:
authorGravatar Ugnich Anton2012-10-23 01:44:58 +0700
committerGravatar Ugnich Anton2012-10-23 01:44:58 +0700
commit9b94011a09685dec1b1b38fef8294c6ffa578079 (patch)
treeab6808f9f10a29628d9bb93905b1fcd3c2887b43 /build.xml
parentadfc38138808eede6bcc29a706c9191e7d2d84fe (diff)
JS/CSS optimization
Diffstat (limited to 'build.xml')
-rw-r--r--build.xml23
1 files changed, 23 insertions, 0 deletions
diff --git a/build.xml b/build.xml
index 94203053..b66246a0 100644
--- a/build.xml
+++ b/build.xml
@@ -10,6 +10,29 @@
<project name="com.juick.http.www" default="default" basedir=".">
<description>Builds, tests, and runs the project com.juick.http.www.</description>
<import file="nbproject/build-impl.xml"/>
+
+ <target name="-pre-dist">
+ <echo level="info" message="Compressing JavaScript and CSS files...." />
+ <path id="yuicompressor.classpath">
+ <fileset dir="${ant.home}/lib">
+ <include name="yuiant.jar"/>
+ <include name="yuicompressor-2.4.7.jar"/>
+ </fileset>
+ </path>
+ <taskdef name="yuicompress" classname="com.yahoo.platform.yui.compressor.YUICompressTask">
+ <classpath>
+ <path refid="yuicompressor.classpath"/>
+ </classpath>
+ </taskdef>
+ <yuicompress linebreak="8000" warn="false" munge="yes" preserveallsemicolons="true" outputfolder="${basedir}/${build.web.dir}">
+ <fileset dir="${basedir}/web">
+ <include name="**/*.js" />
+ <include name="**/*.css" />
+ </fileset>
+ </yuicompress>
+ <echo level="info" message="Compression Complete" />
+ </target>
+
<!--
There exist several targets which are by default empty and which can be