批量壓縮js、css檔案指令碼(使用Ant構建)

來源:互聯網
上載者:User
使用Ant構建批量壓縮js、css檔案

使用Ant批量壓縮js、css檔案

2010 年 01 月 27 日

提供了一個ant指令碼,它主要用於批量壓縮批定目錄下的js、css檔案,此ant指令碼使用到了 YUI Compressor、antcontrib

.

  • Ant Contrib
  • 主要使用它所提供的foreach、propertyregex這兩個target

  • yui compressor 參考資料
  • 壓縮會帶來的一些問題
    不方便錯誤跟蹤,即使js拋錯我們再也不能像往常那樣直接右擊查看源檔案。
    壓縮之後js代碼可讀性非常差,相應的function名稱都會被改變,在無源檔案情況下對令一個同事會是一個惡夢。
  • 下載指令檔
相關文章

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.