天天躁日日躁狠狠躁AV麻豆-天天躁人人躁人人躁狂躁-天天澡夜夜澡人人澡-天天影视香色欲综合网-国产成人女人在线视频观看-国产成人女人视频在线观看

使用YUI+Ant 實(shí)現(xiàn)JS CSS壓縮

今天研究了一下YUI yahoo開源框架,感覺很猛啊。

于是乎我做了一個(gè)YUI的ant實(shí)現(xiàn),網(wǎng)上好多關(guān)于bat的實(shí)現(xiàn),我就另辟蹊徑,出個(gè)關(guān)于這個(gè)的ant實(shí)現(xiàn),嘿嘿獨(dú)一無(wú)二的文章,如果轉(zhuǎn)載的話,其注明作者和網(wǎng)站

copyright:Mr.chen

好了具體操作如下:

官網(wǎng):

yuicompressor-2.4.6.jar 下載地址 http://yuilibrary.com/downloads/#yuicompressor

YUIAnt.jar 下載地址 http://www.ubik-ingenierie.com/miscellanous/YUIAnt/

具體的相關(guān)代碼如下:

#css work dir commonCss.dir = css  #js work dir commonJs.dir = js  #build temp dir  output.temp.dir = build  #output files in the directory output.dir = ${output.temp.dir}_output  #environment needs lib liblib = lib  <?xml version="1.0" encoding="UTF-8"?>  <project name="Compress CSS-JS" default="compress" basedir=".">    <property file="bulid.properties" />    <path id="yuiClasspath">     <fileset dir="${lib}">       <include name="*.*" />     </fileset>   </path>    <!-- #######################Init the environment of the tool ##########################-->   <target name="init">     <echo message="begin to init the init" />     <echo message="delete all reference files." />     <delete dir="${output.dir}" />     <echo message="delete end" />     <echo message="make the reference files." />     <mkdir dir="${output.dir}" />     <mkdir dir="${output.temp.dir}" />     <echo message="make end." />   </target>    <!-- #######################Combine the css files       ##########################-->   <target name="combinecss" depends="init" description="Combine common css files">     <echo message="begin to combine the css files to one file." />     <concat destfile="${output.temp.dir}/combined_css.css" encoding="UTF-8" append="false">       <fileset dir="${commonCss.dir}">         <include name="*.css" />       </fileset>     </concat>     <echo message="combine end." />   </target>    <!-- #######################Combine the js files       ##########################-->   <target name="combinejs">     <echo message="begin to combine the js files to one file." />     <concat destfile="${output.temp.dir}/all_source.js" encoding="utf-8" append="false">       <fileset dir="${commonJs.dir}">         <include name="*.js" />       </fileset>     </concat>     <echo message="combine end." />   </target>    <!-- #######################Compress the js and css files ##########################-->   <target name="compress" depends="combinecss,combinejs" description="Compress">     <echo message="begin to compress the css file." />     <taskdef name="yuicompress" classname="com.yahoo.platform.yui.compressor.YUICompressTask">       <classpath>         <path refid="yuiClasspath" />       </classpath>     </taskdef>     <!-- first method compress the css files -->     <yuicompress linebreak="10000000" warn="false" munge="yes" preserveallsemicolons="true" outputfolder="${output.dir}">       <fileset dir="${output.temp.dir}">         <include name="*.css" />       </fileset>     </yuicompress>     <echo message ="compress the css end." />     <!-- second method compress the js files-->     <echo message ="begin to compress the js file." />     <apply executable="Java" parallel="false" failonerror="true">       <fileset dir="${output.temp.dir}" includes="all_source.js" />       <arg line="-jar" />       <arg path="${lib}/yuicompressor-2.4.6.jar" />       <arg line="--charset utf-8" />       <arg line="-o ${output.dir}/combined_js.js" />       <srcfile />     </apply>     <echo message ="compress the js end." />     <delete dir="${output.temp.dir}" />   </target>  </project>  @echo off echo ################################################ echo ##########Tool Compress the js and css########## echo ################################################ echo Please make sure your css and js in the css'directory and js'directory. echo If sure,please enter any button to continue the tool. pause call ant -buildfile compress.xml compress>build.log echo compress end  pause 

 
 相關(guān)的文件我提供下載,感覺好的,就留言吧

php技術(shù)使用YUI+Ant 實(shí)現(xiàn)JS CSS壓縮,轉(zhuǎn)載需保留來(lái)源!

鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標(biāo)記有誤,請(qǐng)第一時(shí)間聯(lián)系我們修改或刪除,多謝。

主站蜘蛛池模板: 97成人在线| 久热在线这里只有精品7 | 黑人 尺寸 强行害怕 痛哭 | 两个奶被男人揉了一个晚上 | 性白俄罗斯高清xxxxx | 亚洲精品久久久久久久蜜臀老牛 | 国产WW高清大片免费看 | 亚洲AVAV天堂AV在线网爱情 | 欧美一区二区三区激情视频 | 亚洲高清一区二区三区电影 | 暗卫受被肉到失禁各种PLAY | 桃色窝| 综合精品欧美日韩国产在线 | 中文字幕在线观看国产 | 日本一区精品久久久久影院 | 国产WW久久久久久久久久 | 十分钟视频影院免费 | 一区二区视频在线观看高清视频在线 | 全黄h全肉短篇禁乱np | 亚洲精品白色在线发布 | XXX国产麻豆HD | 久久99精品AV99果冻传媒 | 色橹 | 久久亚洲人成网站 | 久久免费看少妇级毛片蜜臀 | 国产亚洲欧美在线中文BT天堂网 | 亚洲视频精品在线观看 | 久久人人爽人人片AV人成 | 男人插曲女人下生免费大全 | 国产精品人成在线播放新网站 | 蜜臀AV久久国产午夜福利软件 | 超大号黑吊magnet | 亚洲 日韩 色 图网站 | 亚洲 欧美 国产 综合 播放 | chinese耄耋70老太性 | 一本道在线综合久久88 | 亚洲AV中文字幕无码久久 | 久久久无码精品无码国产人妻丝瓜 | 伊人久久青草青青综合 | 亚洲福利精品电影在线观看 | 国产69精品久久久久麻豆 |