当前位置:Gxlcms > PHP教程 > 使用YUI+Ant实现JSCSS压缩_php实例

使用YUI+Ant实现JSCSS压缩_php实例

时间:2021-07-01 10:21:17 帮助过:6人阅读

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

于是乎我做了一个YUI的ant实现,网上好多关于bat的实现,我就另辟蹊径,出个关于这个的ant实现,嘿嘿独一无二的文章,如果转载的话,其注明作者和网站

copyright:Mr.chen

好了具体操作如下:

官网:

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

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

具体的相关代码如下:

#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"?> 
 
 
 
   
 
   
 
   
   
     
     
     
     
     
     
     
     
   
 
   
   
     
     
       
         
       
     
     
   
 
   
   
     
     
       
         
       
     
     
   
 
   
   
     
     
       
         
       
     
     
     
       
         
       
     
     
     
     
     
       
       
       
       
       
       
     
     
     
   
 
 
 
@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 


相关的文件我提供下载,感觉好的,就留言吧

人气教程排行