找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 473|回复: 0
打印 上一主题 下一主题

使用YUI+Ant 实现JS CSS压缩

[复制链接]

3444

主题

3465

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
11142
跳转到指定楼层
楼主
发表于 2018-2-14 05:54:49 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

            今天研究了一下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





   

   
     
      
     
   

   
   
     
     
     
     
     
     
     
     
   

   
   
     
     
      
        
      
     
     
   

   
   
     
     
      
        
      
     
     
   

   
   
     
     
      
         
      
     
     
     
      
        
      
     
     
     
     
     
      
      
      
      
      
      
     
     
     
   



@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

相关的文件我提供下载,感觉好的,就留言吧
            
            
您可能感兴趣的文章:
  • ANT 压缩(去掉空格/注释)JS文件可提高js运行速度
  • Android笔记之:App自动化之使用Ant编译项目多渠道打包的使用详解
  • 使用ANT与YUI压缩js的实现方法
  • apache ant进行zip解压缩操作示例分享
  • Java操作Ant压缩和解压文件及批量打包Anroid应用
            
  • 分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
    收藏收藏
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    用户反馈
    客户端