• 技术文章 >后端开发 >php教程

    使用YUI+Ant 实现JS CSS压缩_PHP

    2016-05-31 19:30:20原创331
    今天研究了一下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 


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

    声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。
    专题推荐:YUI Ant 实现JS CSS 压缩
    上一篇:ThinkPHP后台首页index使用frameset时的注意事项分析_PHP 下一篇:重新认识php array_merge函数_PHP
    php培训_php实战培训【立即报名】-php中文网第20期

    相关文章推荐

    • 【活动】充值PHP中文网VIP即送云服务器• 分享一个有趣的php版本的扫雷!• 怎么利用ajax实现赞• thinkphp3.2在Controller里为啥select没有数据• PHP的If语法有关问题 • 跟大家请问一个关于php+mysql字符编码有关问题,多谢
    1/1

    PHP中文网