使用YUI+Ant 實現JS CSS壓縮

來源:互聯網
上載者:User

使用YUI+Ant 實現JS CSS壓縮

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

於是乎我做了一個YUI的ant實現,網上好多關於bat的實現,我就另闢蹊徑,出個關於這個的ant實現,嘿嘿獨一無二的文章,如果轉載的話,其註明作者和網站

copyright:Mr.chen

好了具體操作如下:

 

具體的相關代碼如下:

  1. #css work dir
  2. commonCss.dir = css
  3.  
  4. #js work dir
  5. commonJs.dir = js
  6.  
  7. #build temp dir
  8. output.temp.dir = build
  9.  
  10. #output files in the directory
  11. output.dir = ${output.temp.dir}_output
  12.  
  13. #environment needs lib
  14. liblib = lib

      1.  @echo off
      2. echo ################################################
      3. echo ##########Tool Compress the js and css##########
      4. echo ################################################
      5. echo Please make sure your css and js in the css'directory and js'directory.
      6. echo If sure,please enter any button to continue the tool.
      7. pause
      8. call ant -buildfile compress.xml compress>build.log
      9. echo compress end
      10. pause

        相關的檔案我提供下載,感覺好的,就留言吧

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.