日期:2014-05-17 浏览次数:20738 次
<property name="context" value="${basedir}\context"/> <path id="yuiClasspath"> <fileset dir="${webinf}/lib"> <include name="yuicompressor-2.4.2.jar"/> <include name="YUIAnt.jar"/> </fileset> </path> <target name="compres-js-css" description="压缩 js css 文件"> <taskdef name="yuicompress" classname="com.yahoo.platform.yui.compressor.YUICompressTask"> <classpath> <path refid="yuiClasspath"/> </classpath> </taskdef> <yuicompress linebreak="300" warn="false" munge="yes" preserveallsemicolons="true" outputfolder="${context}"> <fileset dir="${context}"> <include name="js/**/*.js" /> <include name="lib/**/*.js"/> <include name="fckeditor/**/*.js"/> <include name="css/**/*.css"/> <include name="lib/**/*.css"/> <include name="fckeditor/**/*.css"/> </fileset> </yuicompress> </target>