Today studied the Yui Yahoo Open source framework, feel very fierce ah.
So I did a Yui ant implementation, online a lot about the implementation of bat, I went to a way, out of this ant implementation, hehe unique article, if reproduced, its annotated author and website
Copyright:Mr.chen
Okay, here's how it works:
Website:
Yuicompressor-2.4.6.jar Download Address http://yuilibrary.com/downloads/#yuicompressor
Yuiant.jar Download Address http://www.ubik-ingenierie.com/miscellanous/YUIAnt/
The specific relevant code is as follows:
#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" Enco ding= "UTF-8"?>
@echo off Echo ################################################ echo ######### #Tool Compress the JS and css########## Ech O ################################################ echo sure your CSS and JS in the CSS ' directory and JS ' Direc Tory. echo If sure,please Enter any button to continue the tool. Pause call Ant-buildfile Compress.xml compress>build.log echo compress end Pause
Related documents I provide download, feel good, leave a message